Re: new malloc

Nikola Vladov <[email protected]>
Newsgroups gmane.linux.lib.dietlibc
Message-ID <[email protected]>
On Mon, Apr 06, 2009 at 11:53:56AM +0200, Enrico Scholz wrote:
> > May be the main advantage is that one can compile malloc, free, calloc
> > and realloc in separate files.
> 
> fwiw, the paradigm to split functions into separate files is a little
> bit outdated by recent gcc's '-ffunction-sections' + '-fdata-sections'
> options.

Nice!  I have to read about this more.  In any case in separate
files in not worse!  I think this malloc make other improvements also ;-)

> > #include <sys/shm.h>	/* for PAGE_SIZE */
> 
> using PAGE_SIZE macro is highly deprecated as this is not a constant
> value but must be calculated from ELF aux vector.  See

I copy/paste PAGE_SIZE from dietlibc alloc.c
It is not so important in my code.  I have looked on
Enrico site and seem that ELF aux vector is a good idea.
I can make easy changes to avoid using PAGE_SIZE macro.
I need this macro only for mmap(2).  If Felix accept my alloc
and new get_page_size_method is default in dietlibc,
then I'll update my malloc.

Thanks for the interesting info Enrico!

Nikola
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.