www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: A different kind of Walter? :-)

0ffh Wrote:

 Lionello Lunesu wrote:
 Well, that was *exactly* what I was getting at! OK, granted, it's only done 
 in 4KB increments, but that's when a regular array resize (copying the 
 contents over to a new place) would actually start harming performance.

That sounds enticing! If you could put garbage collection into the kernel - even with tile-sized granularity - that would make many things easier. And finally put the idle thread to good use... :-)))

It would be somewhat practical to, before starting to use swap, call the GC to collect garbage and compress what's used in memory, freeing up pages by the block... (squeeze the data from 48% of 6 blocks into 3 blocks, freeing up 3?) Starting to swap (from hard disk) is extremely expensive, and would warrant the overhead from compression, as it would most likely perform faster. This has been something operating systems of the present cannot do - they can't tell a program to clean up it's shit, it's getting crowded.
Apr 22 2007