Problem --with-gc=simple.

Boehm, Hans hans_boehm@hp.com
Mon Jul 30 15:03:00 GMT 2001


Unfortunately, you also need to look at the GET_MEM definition in gc_priv.h.
It should have been moved to gcconfig.h a long time ago, but hasn't yet.
On most Un*x-like systems, the default is to use sbrk to get memory, unless
USE_MMAP is defined. On a few systems, that's not reliable becasue you
can't interleave mmap and malloc calls. (In my opinion, this basically
means sbrk is broken, but ...) There are also other potential reasons to
use mmap, but by default the collector usually doesn't.
The third common alternative is to get memory from the system malloc. That
incurs a bit of a space performance cost, because it virtually guarantees
that different heap sections are never contiguous (due to the malloc
header), thus increasing fragmentation.
Hans
> -----Original Message-----
> From: Anthony Green [ mailto:green@redhat.com ]
> Sent: Thursday, July 26, 2001 5:34 AM
> To: Bryce McKinlay; Antonio Ake
> Cc: Jeff Sturm; java@gcc.gnu.org
> Subject: Re: Problem --with-gc=simple.
>>> Bryce wrote:
> > You probibly want to look in the boehm-gc directory and see 
> if you can
> make it
> > use something other than mmap() on your target. Take a look 
> at os-dep.c.
>> Right. I've run gcj code on a number of different simulator targets
> recently. It sounds like Antonio needs to configure things 
> properly in
> gcconfig.h. I think mmap is used to get memory for some 
> unix targets. For
> embedded target's we've simulated we simply define our own 
> "sbrk" which
> returns memory from a statically allocated heap. Search for ECOS in
> os-dep.c.
>> AG
>>


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /