This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Collecting more frequently
- To: law at cygnus dot com
- Subject: Re: Collecting more frequently
- From: Joe Buck <jbuck at possibly dot synopsys dot com>
- Date: Tue, 21 Mar 2000 19:06:20 -0800 (PST)
- Cc: mrs at windriver dot com (Mike Stump), gcc at gcc dot gnu dot org, martin at loewis dot home dot cs dot tu-berlin dot de, mark at codesourcery dot com
> 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.