Kaffe Memory Management
Nathan Meyers
nmeyers at javalinux.net
Wed Jun 7 10:05:32 PDT 2000
On Wed, Jun 07, 2000 at 05:22:01PM +0100, Johan Andersson wrote:
> Hi.
>
>
> Why does Kaffe (linux) uses sbrk(..) to allocate memory. According to the man. pages for sbrk(..) it is not very feasible. Why doesn't Kaffe use malloc(..)?
Malloc() is a good general-purpose memory manager, but it's common
practice for apps that want to exert smarter control over memory usage
to bypass it and use sbrk(). There's nothing at all infeasible about it.
Nathan
>
> In gc_small_alloc(..) and gc_large_alloc(..):
>
> info->funcs=(unitp8*)GCBLOCK2BASE(info);
> info->state=(unitp8*)(info->funcs+nr);
> info->data=....;
> .
> What happens here? Where do these pointers point to. Memory addresses in the heap or to addresses in the space allocated by malloc for a number of gc_blocks (which is used by the gc_primary_freelist).
>
> The bottom line is, what of the gc_block is put on the heap?
>
>
> /johan
>
>
More information about the kaffe
mailing list