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


On Jan 19, 2000, Marc Espie <espie@quatramaran.ens.fr> wrote:

> Read carefully. valloc(size) is implemented by calling malloc after adding
> pagesize-1 to size. So unless size == 0, malloc is called with something
> larger than a page, so malloc's result is aligned on a page boundary.

This information can't be derived from the snippet you posted.  Is it
really true that malloc on OpenBSD will return a page-aligned address
just because size > pagesize?  This would mean a lot of memory is
wasted!

-- 
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them


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