diff options
author | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2021-07-22 18:37:57 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2021-07-22 18:37:57 +0530 |
commit | 55a4dd39308951da4b0da84b19e415c2bb451b60 (patch) | |
tree | a0c690570b0bcbe7216e9936b06ea01c3b15fe5c /malloc/arena.c | |
parent | 57b07bede12635bd6d6aa0e488824bb510bbeca4 (diff) | |
download | glibc-55a4dd39308951da4b0da84b19e415c2bb451b60.tar.gz glibc-55a4dd39308951da4b0da84b19e415c2bb451b60.tar.xz glibc-55a4dd39308951da4b0da84b19e415c2bb451b60.zip |
Remove __morecore and __default_morecore
Make the __morecore and __default_morecore symbols compat-only and remove their declarations from the API. Also, include morecore.c directly into malloc.c; this should ideally get merged into malloc in a future cleanup. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'malloc/arena.c')
-rw-r--r-- | malloc/arena.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/malloc/arena.c b/malloc/arena.c index 991fc21a7e..f1693ed48f 100644 --- a/malloc/arena.c +++ b/malloc/arena.c @@ -274,14 +274,6 @@ next_env_entry (char ***position) #endif -#if defined(SHARED) || defined(USE_MTAG) -static void * -__failing_morecore (ptrdiff_t d) -{ - return (void *) MORECORE_FAILURE; -} -#endif - #ifdef SHARED extern struct dl_open_hook *_dl_open_hook; libc_hidden_proto (_dl_open_hook); @@ -310,7 +302,7 @@ ptmalloc_init (void) and that morecore does not support tagged regions, then disable it. */ if (__MTAG_SBRK_UNTAGGED) - __morecore = __failing_morecore; + __always_fail_morecore = true; mtag_enabled = true; mtag_mmap_flags = __MTAG_MMAP_FLAGS; @@ -323,7 +315,7 @@ ptmalloc_init (void) generic sbrk implementation also enforces this, but it is not used on Hurd. */ if (!__libc_initial) - __morecore = __failing_morecore; + __always_fail_morecore = true; #endif thread_arena = &main_arena; |