Collecting more frequently

Joe Buck jbuck@possibly.synopsys.com
Tue Mar 21 19:07:00 GMT 2000


> I briefly pondered the idea of trying to malloc a large hunk of memory
> in the collector (say a few meg) and if that failed to force a collector
> run and force the collector to free any pages it's got cached.

Michael Meissner mentioned the speculative allocation problem (on Linux
and a couple of other systems), but even for conservative systems where
each allocated page must be backed by swap, virtual memory may be much
greater than physical memory, so it would would be best to have some bound
based on the estimated real memory size, so paging is avoided if possible.
Unfortunately there isn't a portable way of doing this.


More information about the Gcc mailing list