This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: Problem --with-gc=simple.
- To: "'Anthony Green'" <green at redhat dot com>, Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>, Antonio Ake <ake at ecn dot purdue dot edu>
- Subject: RE: Problem --with-gc=simple.
- From: "Boehm, Hans" <hans_boehm at hp dot com>
- Date: Mon, 30 Jul 2001 15:03:46 -0700
- Cc: Jeff Sturm <jsturm at one-point dot com>, java at gcc dot gnu dot org
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
>
>