Re: Moving memory in VM?
Johnny Billquist <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.kernel |
|---|---|
| Organization | SoftJAR AB |
| Message-ID | <[email protected]> |
mremap? Or what am I missing? Johnny On 2024-07-19 18:41, Mouse wrote: > Is there any way to move memory within a process? That is, I have a > bunch of valid pages at addresses [A..B) and I want to move those pages > to [C..C+(B-A)). > > The principal use case I have at the moment has the initial mapping > mapped MAP_ANON, with C fixed and mmap()-style semantics for anything > that was in the target range to start with. It's OK if the [A..B) > range is unmapped in the process, and it's OK to requires that the old > and new address ranges not overlap. (I'm trying to implement an > alternative memory allocator and want realloc() for multi-page blocks > to be faster than copying all the bytes.) > > /~\ The ASCII Mouse > \ / Ribbon Campaign > X Against HTML [email protected] > / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: [email protected] || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol