mirror of
https://git.proxmox.com/git/wasi-libc
synced 2025-07-10 15:25:44 +00:00
activate the use of __heap_base (#215)
This commit is contained in:
parent
215adc8ac9
commit
d2482b786a
@ -4560,12 +4560,10 @@ static void* tmalloc_small(mstate m, size_t nb) {
|
|||||||
|
|
||||||
#if !ONLY_MSPACES
|
#if !ONLY_MSPACES
|
||||||
|
|
||||||
#if 0 // Temporarily work around https://bugs.llvm.org/show_bug.cgi?id=43613
|
|
||||||
#if __wasilibc_unmodified_upstream // Forward declaration of try_init_allocator.
|
#if __wasilibc_unmodified_upstream // Forward declaration of try_init_allocator.
|
||||||
#else
|
#else
|
||||||
static void try_init_allocator(void);
|
static void try_init_allocator(void);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
void* dlmalloc(size_t bytes) {
|
void* dlmalloc(size_t bytes) {
|
||||||
/*
|
/*
|
||||||
@ -4595,13 +4593,11 @@ void* dlmalloc(size_t bytes) {
|
|||||||
ensure_initialization(); /* initialize in sys_alloc if not using locks */
|
ensure_initialization(); /* initialize in sys_alloc if not using locks */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0 // Temporarily work around https://bugs.llvm.org/show_bug.cgi?id=43613
|
|
||||||
#if __wasilibc_unmodified_upstream // Try to initialize the allocator.
|
#if __wasilibc_unmodified_upstream // Try to initialize the allocator.
|
||||||
#else
|
#else
|
||||||
if (!is_initialized(gm)) {
|
if (!is_initialized(gm)) {
|
||||||
try_init_allocator();
|
try_init_allocator();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!PREACTION(gm)) {
|
if (!PREACTION(gm)) {
|
||||||
@ -5213,8 +5209,7 @@ static void internal_inspect_all(mstate m,
|
|||||||
}
|
}
|
||||||
#endif /* MALLOC_INSPECT_ALL */
|
#endif /* MALLOC_INSPECT_ALL */
|
||||||
|
|
||||||
#if 0 // Temporarily work around https://bugs.llvm.org/show_bug.cgi?id=43613
|
#ifdef __wasilibc_unmodified_upstream // Define a function that initializes the initial state of dlmalloc.
|
||||||
#ifdef __wasilibc_unmodified_upstream // Define a function that initializes the initial state of dlmalloc
|
|
||||||
#else
|
#else
|
||||||
/* ------------------ Exported try_init_allocator -------------------- */
|
/* ------------------ Exported try_init_allocator -------------------- */
|
||||||
|
|
||||||
@ -5249,7 +5244,6 @@ static void try_init_allocator(void) {
|
|||||||
init_top(gm, (mchunkptr)base, initial_heap_size - TOP_FOOT_SIZE);
|
init_top(gm, (mchunkptr)base, initial_heap_size - TOP_FOOT_SIZE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
/* ------------------ Exported realloc, memalign, etc -------------------- */
|
/* ------------------ Exported realloc, memalign, etc -------------------- */
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ __floatsitf
|
|||||||
__floatunsitf
|
__floatunsitf
|
||||||
__getf2
|
__getf2
|
||||||
__gttf2
|
__gttf2
|
||||||
|
__heap_base
|
||||||
__letf2
|
__letf2
|
||||||
__lttf2
|
__lttf2
|
||||||
__netf2
|
__netf2
|
||||||
|
Loading…
Reference in New Issue
Block a user