This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.17-140-g2a26ef3


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  2a26ef3a012cc29623423ca52c1cc8001d847d54 (commit)
      from  d542f8ed21474035990eddbf9dfdf11660692335 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2a26ef3a012cc29623423ca52c1cc8001d847d54

commit 2a26ef3a012cc29623423ca52c1cc8001d847d54
Author: Pino Toscano <toscano.pino@tiscali.it>
Date:   Thu Jan 17 21:08:12 2013 +0100

    Add HAVE_MREMAP for mremap usage
    
    Introduce (only on Linux) and use a HAVE_MREMAP symbol to advertize mremap
    availability.
    
    Move the malloc-sysdep.h include from arena.c to malloc.c, since what is
    provided by malloc-sysdep.h is needed earlier in malloc.c, before the inclusion
    of arena.c.

diff --git a/ChangeLog b/ChangeLog
index 885176a..e7cfb64 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-01-17  Pino Toscano  <toscano.pino@tiscali.it>
+
+	* sysdeps/unix/sysv/linux/malloc-sysdep.h (HAVE_MREMAP): New define.
+	* malloc/malloc.c: Include <unistd.h> and <malloc-sysdep.h>.
+	[!HAVE_MREMAP]: Remove [defined linux] case.
+	* malloc/arena.c: Do not include <malloc-sysdep.h>.
+
 2013-01-17  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
 	* sysdeps/ieee754/dbl-64/mpa.c: Fix header comment.
diff --git a/malloc/arena.c b/malloc/arena.c
index 0c77802..7d51a9d 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -19,9 +19,6 @@
 
 #include <stdbool.h>
 
-/* Get the implementation for check_may_shrink_heap.  */
-#include <malloc-sysdep.h>
-
 /* Compile-time constants.  */
 
 #define HEAP_MIN_SIZE (32*1024)
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 9188d4e..bbb0353 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -168,7 +168,7 @@
 
     Compilation Environment options:
 
-    HAVE_MREMAP                0 unless linux defined
+    HAVE_MREMAP                0
 
     Changing default word sizes:
 
@@ -214,8 +214,10 @@
 
 #include <stddef.h>   /* for size_t */
 #include <stdlib.h>   /* for getenv(), abort() */
+#include <unistd.h>   /* for __libc_enable_secure */
 
 #include <malloc-machine.h>
+#include <malloc-sysdep.h>
 
 #include <atomic.h>
 #include <_itoa.h>
@@ -490,19 +492,13 @@ void *(*__morecore)(ptrdiff_t) = __default_morecore;
 
 /*
   Define HAVE_MREMAP to make realloc() use mremap() to re-allocate
-  large blocks.  This is currently only possible on Linux with
-  kernel versions newer than 1.3.77.
+  large blocks.
 */
 
 #ifndef HAVE_MREMAP
-#ifdef linux
-#define HAVE_MREMAP 1
-#else
 #define HAVE_MREMAP 0
 #endif
 
-#endif /* HAVE_MREMAP */
-
 
 /*
   This version of malloc supports the standard SVID/XPG mallinfo
diff --git a/sysdeps/unix/sysv/linux/malloc-sysdep.h b/sysdeps/unix/sysv/linux/malloc-sysdep.h
index 0a876df..737ca0e 100644
--- a/sysdeps/unix/sysv/linux/malloc-sysdep.h
+++ b/sysdeps/unix/sysv/linux/malloc-sysdep.h
@@ -55,3 +55,5 @@ check_may_shrink_heap (void)
 
   return may_shrink_heap;
 }
+
+#define HAVE_MREMAP 1

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                               |    7 +++++++
 malloc/arena.c                          |    3 ---
 malloc/malloc.c                         |   12 ++++--------
 sysdeps/unix/sysv/linux/malloc-sysdep.h |    2 ++
 4 files changed, 13 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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