Mail Archives: djgpp-workers/2000/05/10/07:47:15
> Date: Tue, 9 May 2000 15:56:59 -0400
> From: DJ Delorie <dj AT delorie DOT com>
>
> > Yes, but why use mmap for that? Why not use sbrk?
>
> When you're done with the mmap'd memory, you can unmap it and release
> it to the system. With sbrk you can only return it to your local
> heap
Doesn't sbrk return memory to the system when called with a negative
argument, at least on some systems? (Ours doesn't, but this is
obviously not a problem for DJGPP anyway.)
> Plus, individual mmap'd regions can be grown as needed.
How would this be implemented, typically? Growing a memory region
should need to relocate it, at least sometimes, no? It sounds a lot
like realloc, unless I'm missing something.
- Raw text -