[EMAIL PROTECTED] (Anand Palaniswamy) writes:
> It is possible to unmap memory and return it to the OS on Linux. I am
> sure Emacs does that. The classic VM garbage collector can not do
> that. It wants to keep the memory mapped (so it can always be sure
> that the heap is contiguous -- unmmapping might lead to someone else
> stealing the part you just unmapped). The trick classic VM uses on
> Solaris and on Windows is to keep the heap mapped but not have any
> swap committed to it (which is slightly different from completely
> unmapping it).
>
> Emacs can probably deal with discontiguous heaps. (Infact I wouldn't
> be surprised if there is a special heap for large files).
Out of curiosity, I traced the system calls. Emacs is calling brk(),
there is no mmap() activity. My recollection is that this is a
feature of the GNU malloc package. Classical mallocs do not know how
to return memory to the system by decreasing the data segment size.
GNU malloc does.
Joe Buehler
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]