[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (heap 1024 82721 1933216)
From: |
Stefan Monnier |
Subject: |
Re: (heap 1024 82721 1933216) |
Date: |
Sat, 18 Jan 2014 21:53:26 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> value. dlmalloc's free memory retention seems a bit severe here.
There are several levels at which the memory is "returned to the other level":
- if a single cons cell is in use in a "cons cell block", that block
can't be freed.
- those blocks are themselves allocated in groups of 16 IIRC, so those
groups can only be freed once all 16 of them have been freed at the
previous level.
- malloc/free can itself decide to keep those "freed" blocks for later
use, or to return them to the OS. At this level, the behavior depends
on the malloc library in use, which depends on the OS.
IIUC there are malloc libraries in use which never return memory back
to the OS.
> Are we just badly fragmenting the heap?
Could be. For an Emacs that grew to 6GB, I don't find it worrisome
if it doesn't shrink back below 2GB. I'm much more worried about: how
on earth did it grow to 6GB?
Stefan
Re: (heap 1024 82721 1933216),
Stefan Monnier <=
Re: (heap 1024 82721 1933216), Eli Zaretskii, 2014/01/19