]> sourceware.org Git - glibc.git/commitdiff
malloc: Move MTAG_MMAP_FLAGS definition
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 28 Jan 2021 17:34:36 +0000 (17:34 +0000)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Fri, 26 Mar 2021 11:03:06 +0000 (11:03 +0000)
This is only used internally in malloc.c, the extern declaration
was wrong, __mtag_mmap_flags has internal linkage.

Reviewed-by: DJ Delorie <dj@redhat.com>
include/malloc.h
malloc/malloc.c

index 7ae08d53d3ba444a0c78eac6759983632d185e18..b77761f74d87bcf73095d2b01e9beb86c18599cf 100644 (file)
@@ -16,11 +16,4 @@ typedef struct malloc_state *mstate;
 
 # endif /* !_ISOMAC */
 
-#ifdef USE_MTAG
-extern int __mtag_mmap_flags;
-#define MTAG_MMAP_FLAGS __mtag_mmap_flags
-#else
-#define MTAG_MMAP_FLAGS 0
-#endif
-
 #endif
index eae000b87eb09b2834c16797339c8cb63a1ad60a..9dd811b26a3e1efe32671d61fd3337c3139dc8a6 100644 (file)
@@ -463,11 +463,13 @@ static void *(*__tag_region)(void *, size_t) = __default_tag_region;
 static void *(*__tag_new_usable)(void *) = __default_tag_nop;
 static void *(*__tag_at)(void *) = __default_tag_nop;
 
+# define MTAG_MMAP_FLAGS __mtag_mmap_flags
 # define TAG_NEW_MEMSET(ptr, val, size) __tag_new_memset (ptr, val, size)
 # define TAG_REGION(ptr, size) __tag_region (ptr, size)
 # define TAG_NEW_USABLE(ptr) __tag_new_usable (ptr)
 # define TAG_AT(ptr) __tag_at (ptr)
 #else
+# define MTAG_MMAP_FLAGS 0
 # define TAG_NEW_MEMSET(ptr, val, size) memset (ptr, val, size)
 # define TAG_REGION(ptr, size) (ptr)
 # define TAG_NEW_USABLE(ptr) (ptr)
This page took 0.048147 seconds and 5 git commands to generate.