How to return GC-d memory back to OS

Oskar Linde oskar.lindeREM at OVEgmail.com
Fri Aug 4 04:06:31 PDT 2006


Karen Lanrap wrote:
> Oskar Linde wrote:
>> But apart from needing much swap space, there are no draw backs
>> of using much virtual memory. The memory you don't use (but
>> exists in your virtual address range) will not map to physical
>> memory and will not affect your computers performance.
> 
> That is not true in general:
> | "For the attack to succeed, one needs to find a reliable way to
> | force interesting kernel code to be paged out, then find that
> | code inside a page file and modify it. And finally, the kernel
> | needs to load that code (now modified) again into physical
> | memory and execute it,"
> 
> http://www.darkreading.com/document.asp?doc_id=99780
> 
> ---and for the current GC of D it is especially not true, because the 
> sweeps of the GC do use the memory.

My point was that if the memory was collected by the GC, but not 
returned to the OS, the GC would not sweep it, and it would remain 
swapped out.

/Oskar



More information about the Digitalmars-d-learn mailing list