This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Updated patch: add xvalloc()
- To: gcc-patches at gcc dot gnu dot org
- Subject: Re: Updated patch: add xvalloc()
- From: "Zack Weinberg" <zackw at stanford dot edu>
- Date: Wed, 10 Jan 2001 23:26:03 -0800
- References: <20010110120050.32567.qmail@lauras.lt>
On Wed, Jan 10, 2001 at 02:00:50PM +0200, Laurynas Biveinis wrote:
> Hello,
>
> this is yet another patch to add xvalloc()/xvfree() to libiberty
> and make ggc-page use it. This patch does not add any new functionality,
> it just moves around code and removes multiple page munmap() optimization,
> but it will be re-added later. It's a mere preparation for future
> xvalloc() improvement by Zack Weinberg and maybe me.
I think we would rather you did not use mmap in xvalloc. Just use
valloc and/or malloc. The multiple page munmap optimization is rather
important. Also, we might want to do page protection hacks in the
near future, and those aren't safe when GC pages come from the malloc
pool. So we really do need to know inside GCC whether or not we're
using mmap.
Are the memory-saving tricks we discussed last month(allocate larger
blocks and parcel out pages) coming later?
zw