Re: a few observations & questions on gc

Date view Thread view Subject view Author view

From: Godmar Back (gback@cs.utah.edu)
Date: Tue Jan 05 1999 - 18:00:14 EST


>
> Godmar Back writes:
> > Does ps include memory used for mmapped files?
>
> Um, I can't remember. I think so. But shouldn't these get unmapped
> when we're done with them anyway?

I don't think so. How would we know when we're done, anyway?
Also, I don't think it's an issue on modern systems that combine
virtual memory and buffer cache anyway.

>
> > Does -verbosegc show different memory usage when zip files are unpacked?
>
> I'll ask Amancio.
>
> > We don't use FreeBSD malloc/free, and we never return anything.
>
> Hmm.. so kaffe calls sbrk(2) directly? Why not just use malloc/free?

Look at gc-block-mmap.c to see what kaffe does. I think it's sbrk()
first, then it falls back on other possibilities. I think the idea here
was to avoid fragmentation and overhead resulting from using malloc.

> Then when we freed enough memory, it would go back to the system.

Well, it's not that easy. You'd also have to remove it from kaffe's
primitive free list.

We need a concept here -- maybe we should look at adapting/adopting Doug Lea's
malloc()? This would give us memalign as well.

        - Godmar


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:29 EDT