This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: malloc-based ggc-page


>>>>> "Alexandre" == Alexandre Oliva <oliva@lsd.ic.unicamp.br> writes:

    Alexandre> On Jan 18, 2000, Mark Mitchell <mark@codesourcery.com>
    Alexandre> wrote:

    >> I question whether this is really worth it.

    Alexandre> It is.  I, as a user of a system that used to use
    Alexandre> ggc-slow (which should be the real name of ggc-simple
    Alexandre> :-) because no other alternative was (known to be)
    Alexandre> available, would be very much pleased to be able to use
    Alexandre> ggc-page instead.

I understand that avoiding ggc-simple is worth it -- I'm not sure
whether your solution is optimal.  (But, by the way, didn't your
system turn out to have an acceptable mmap?)

So, what real systems that people really use don't already come with,
at the very least, valloc?

But, let's assume interesting such systems do exist.

Then, I would still suggest that you implement valloc in libiberty.
Give up on trying to free the memory -- just keep the allocated pages
around and reuse them.  We already do this to some extent, so it would
be trivial to implement.  This is unlikely to have any effect on the
*peak* memory usage of GCC; only on the *average* usage.  (Right now,
if you watch a running GCC, it's memory usage increases and decreases
as it allocates and frees pages.)  On a system this crippled, I think
that's a pretty good tradeoff.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]