This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Reducing memory consumption
- To: law at cygnus dot com
- Subject: Re: Reducing memory consumption
- From: Alexandre Oliva <aoliva at cygnus dot com>
- Date: 20 Mar 2000 16:13:35 -0300
- Cc: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>, mark at codesourcery dot com, gcc-patches at gcc dot gnu dot org
- Organization: Cygnus Solutions, a Red Hat Company
- References: <29101.953574737@upchuck>
On Mar 20, 2000, Jeffrey A Law <law@cygnus.com> wrote:
>> So perhaps it is not a good idea to use valloc, then, and instead
>> allocate more than one page at a time using malloc?
> Possibly. Alexandre has a patch which does this I think
Nope, it just allocates whatever the user expects. However, it tells
the user to expect a certain overhead, which is how much space
malloc/valloc would need just before the beginning of a page in order
to avoid wasting whole pages with their meta-data. If it finds valloc
just won't work that way, it falls back to malloc, hoping it does. If
neither do, it allocates excess space and manages to get an aligned
page in the area it gets from malloc.
--
Alexandre Oliva Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me