malloc: Remove the internal_function attribute
authorFlorian Weimer <fweimer@redhat.com>
Thu, 31 Aug 2017 13:56:21 +0000 (15:56 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 31 Aug 2017 13:59:06 +0000 (15:59 +0200)
ChangeLog
malloc/arena.c
malloc/hooks.c
malloc/malloc-internal.h
malloc/malloc.c
malloc/mtrace.c

index ae519b1..b49e2bd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
 2017-08-31  Florian Weimer  <fweimer@redhat.com>
 
+       * malloc/arena.c (__malloc_fork_lock_parent)
+       (__malloc_fork_unlock_parent, __malloc_fork_unlock_child)
+       (next_env_entry, new_heap, heap_trim, arena_get2): Remove
+       internal_function from defintions.
+       * malloc/hooks.c (mem2mem_check, mem2chunk_check): Likewise.
+       * malloc/malloc-internal.h (__malloc_fork_lock_parent)
+       (__malloc_fork_unlock_parent, __malloc_fork_unlock_child): Remove
+       internal_function from declarations.
+       * malloc/malloc.c (internal_function): Do not define.
+       (mem2mem_check): Remove internal_function from declaration.
+       (munmap_chunk, mremap_chunk): Remove internal_function.
+       * malloc/mtrace.c (tr_where): Likewise.
+
+2017-08-31  Florian Weimer  <fweimer@redhat.com>
+
        * include/rpc/pmap_clnt.h (__get_socket): Remove
        internal_function.
        * sunrpc/auth_des.c (synchronize): Likewise.
index afd4232..9e5a62d 100644 (file)
@@ -141,7 +141,6 @@ int __malloc_initialized = -1;
    subsystem.  */
 
 void
-internal_function
 __malloc_fork_lock_parent (void)
 {
   if (__malloc_initialized < 1)
@@ -162,7 +161,6 @@ __malloc_fork_lock_parent (void)
 }
 
 void
-internal_function
 __malloc_fork_unlock_parent (void)
 {
   if (__malloc_initialized < 1)
@@ -179,7 +177,6 @@ __malloc_fork_unlock_parent (void)
 }
 
 void
-internal_function
 __malloc_fork_unlock_child (void)
 {
   if (__malloc_initialized < 1)
@@ -246,7 +243,6 @@ TUNABLE_CALLBACK_FNDECL (set_tcache_unsorted_limit, size_t)
 extern char **_environ;
 
 static char *
-internal_function
 next_env_entry (char ***position)
 {
   char **current = *position;
@@ -458,7 +454,6 @@ static char *aligned_heap_area;
    of the page size. */
 
 static heap_info *
-internal_function
 new_heap (size_t size, size_t top_pad)
 {
   size_t pagesize = GLRO (dl_pagesize);
@@ -602,7 +597,6 @@ shrink_heap (heap_info *h, long diff)
     } while (0)
 
 static int
-internal_function
 heap_trim (heap_info *heap, size_t pad)
 {
   mstate ar_ptr = heap->ar_ptr;
@@ -880,7 +874,6 @@ out:
 }
 
 static mstate
-internal_function
 arena_get2 (size_t size, mstate avoid_arena)
 {
   mstate a;
index 4398c0a..01be076 100644 (file)
@@ -132,7 +132,6 @@ malloc_check_get_size (mchunkptr p)
    into a user pointer with requested size req_sz. */
 
 static void *
-internal_function
 mem2mem_check (void *ptr, size_t req_sz)
 {
   mchunkptr p;
@@ -166,7 +165,6 @@ mem2mem_check (void *ptr, size_t req_sz)
    pointer.  If the provided pointer is not valid, return NULL. */
 
 static mchunkptr
-internal_function
 mem2chunk_check (void *mem, unsigned char **magic_p)
 {
   mchunkptr p;
index 6a62717..a9c9c6a 100644 (file)
 
 
 /* Called in the parent process before a fork.  */
-void __malloc_fork_lock_parent (void) internal_function attribute_hidden;
+void __malloc_fork_lock_parent (void) attribute_hidden;
 
 /* Called in the parent process after a fork.  */
-void __malloc_fork_unlock_parent (void) internal_function attribute_hidden;
+void __malloc_fork_unlock_parent (void) attribute_hidden;
 
 /* Called in the child process after a fork.  */
-void __malloc_fork_unlock_child (void) internal_function attribute_hidden;
+void __malloc_fork_unlock_child (void) attribute_hidden;
 
 /* Set *RESULT to LEFT * RIGHT.  Return true if the multiplication
    overflowed.  */
index e1159a5..1c2a0b0 100644 (file)
@@ -999,13 +999,6 @@ int      __posix_memalign(void **, size_t, size_t);
 #define RETURN_ADDRESS(X_) (NULL)
 #endif
 
-/* On some platforms we can compile internal, not exported functions better.
-   Let the environment provide a macro and define it to be empty if it
-   is not available.  */
-#ifndef internal_function
-# define internal_function
-#endif
-
 /* Forward declarations.  */
 struct malloc_chunk;
 typedef struct malloc_chunk* mchunkptr;
@@ -1021,11 +1014,11 @@ static void*  _mid_memalign(size_t, size_t, void *);
 
 static void malloc_printerr(const char *str) __attribute__ ((noreturn));
 
-static void* internal_function mem2mem_check(void *p, size_t sz);
-static void top_check (void);
-static void internal_function munmap_chunk(mchunkptr p);
+static void* mem2mem_check(void *p, size_t sz);
+static void top_check(void);
+static void munmap_chunk(mchunkptr p);
 #if HAVE_MREMAP
-static mchunkptr internal_function mremap_chunk(mchunkptr p, size_t new_size);
+static mchunkptr mremap_chunk(mchunkptr p, size_t new_size);
 #endif
 
 static void*   malloc_check(size_t sz, const void *caller);
@@ -2830,7 +2823,6 @@ systrim (size_t pad, mstate av)
 }
 
 static void
-internal_function
 munmap_chunk (mchunkptr p)
 {
   INTERNAL_SIZE_T size = chunksize (p);
@@ -2864,7 +2856,6 @@ munmap_chunk (mchunkptr p)
 #if HAVE_MREMAP
 
 static mchunkptr
-internal_function
 mremap_chunk (mchunkptr p, size_t new_size)
 {
   size_t pagesize = GLRO (dl_pagesize);
index d6eb497..6c362d9 100644 (file)
@@ -73,7 +73,7 @@ tr_break (void)
 }
 libc_hidden_def (tr_break)
 
-static void internal_function
+static void
 tr_where (const void *caller, Dl_info *info)
 {
   if (caller != NULL)