Kaffe Memory Management

Johan Andersson anderssj at tcd.ie
Wed Jun 7 09:22:01 PDT 2000


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(..)?

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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://kaffe.org/pipermail/kaffe/attachments/20000607/ed4ff19c/attachment-0010.htm 


More information about the kaffe mailing list