[PATCH] Use madvise in glibc

Jakub Jelinek jakub@redhat.com
Fri Jul 23 14:53:00 GMT 2004


On Fri, Jul 23, 2004 at 03:46:11PM +0200, Thorsten Kukuk wrote:
> One of our gcc developers made a patch for glibc to use madvise to
> tell the kernel that the loaded libraries are expected to be needed
> in the near future.
> After this, I got a lot of requests from people, who think that this
> feature needs to go upstream.
> 
> I have attached the patch for discussion.

> 2004-07-23  Thorsten Kukuk  <kukuk@suse.de>
> 
> 	* glibc-2.3/sysdeps/unix/sysv/linux/syscalls.list: Also
> 	define __madvise.

Please avoid creating new __* aliases.
Adding libc_hidden_proto (madvise) to include/sys/mman.h
would be IMHO better (and libc_hidden_def (madvise) to
sysdeps/{generic,unix/sysv/aix}/madvise.c).

Have you done some benchmarking on what positive (or negative)
effect this has on commonly used programs?

	Jakub



More information about the Libc-alpha mailing list