PATCH: new GC implementation

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Thu Sep 30 23:58:00 GMT 1999


 > From: Mark Mitchell <mark@codesourcery.com>
 >  
 > >>>>> "Bernd" == Bernd Schmidt <bernds@cygnus.co.uk> writes:
 >  
 >     >> Finally, the allocator obtains memory by mmap'ing from
 >     >> /dev/zero.
 >  
 >     Bernd> This doesn't exist on all systems; e.g. HP/UX doesn't
 >     Bernd> appear to have it.
 >  
 > I believe Alex plans to contribute autoconf support to conditionally
 > select ggc-mmap instead of gcc-simple.  (The patch he just sent in
 > doesn't enable ggc-mmap at all, unless you explicitly turn it on.)
 > The autoconf checks will check that `mmap' exists/works and that
 > `/dev/zero' exists, I guess.  Someone with an interest can extend
 > ggc-mmap to deal with other systems; its algorithms should actually
 > work just fine with valloc/memalign or with the NT way of mapping
 > memory (I forget the syscall right now).
 >  
 > Basically, those extensions will consist of inserting appropriate
 > autoconf checks, and then conditionalizing the memory allocation and
 > deallocation routines in ggc-mmap.c.

One thing to remember, I think when you compile gcc with a cross
compiler (host!=build) then you can't do the relevant autoconf checks.

E.g. can't see if /dev/zero exists and can't run the "mmap works" test
cause its a runtime check.  So in that case, you'll have to back down
to the default GC by default.

		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions



More information about the Gcc-patches mailing list