[D-runtime] Committed and uncommitted memory in the GC
Rainer Schuetze
r.sagitario at gmx.de
Thu May 30 03:45:19 PDT 2013
On 29.05.2013 19:23, Leandro Lucarella wrote:
> In CDGC I completely removed the distinction between committed and
> uncommitted memory. This is only useful for Windows AFAIK, but is
> currently handled as an integral part of the GC as if it were something
> all the OSs use. Besides making the code a little bit more complex, it
> has some performance impact (involves some bit manipulation and
> reading).
>
> Do you think the price we pay for this is justified or will you be
> opened to remove the distinction between committed and uncommitted
> memory from the GC? (in Windows, the os_mem_alloc function will
> automatically commit the memory too and the deallocation will decommit
> it).
>
Considering that (apart from very large user allocations that need
committed memory anyway) the maximum pool size is currently only 32 MB
(though I think this should be configurable), it doesn't make much sense
to me to distinguish between committed and uncommitted memory. It is
probably also more efficient to allocate committed memory than to commit
it in separate steps for every 64kB.
According to the repo-history Sean is the author of that code, so he
might have good use cases for uncommitted memory.
More information about the D-runtime
mailing list