diff options
author | Sverker Eriksson <[email protected]> | 2016-04-11 18:13:31 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-04-15 19:00:34 +0200 |
commit | 499a872d5f6ea09d23eb7b04ea5de2f6d3fabd98 (patch) | |
tree | 9d4c966a3dcf1f6618f3c72277404ff8e17b3652 /erts/emulator/beam/erl_alloc_util.h | |
parent | 6cbd63b281a9690b2db5fead3f756d34140f8fb5 (diff) | |
download | otp-499a872d5f6ea09d23eb7b04ea5de2f6d3fabd98.tar.gz otp-499a872d5f6ea09d23eb7b04ea5de2f6d3fabd98.tar.bz2 otp-499a872d5f6ea09d23eb7b04ea5de2f6d3fabd98.zip |
erts: Refactor callbacks for literal mseg alloc
Make the callbacks more general to be usable for any allocator
that that uses its own ErtsMemMapper.
Diffstat (limited to 'erts/emulator/beam/erl_alloc_util.h')
-rw-r--r-- | erts/emulator/beam/erl_alloc_util.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_alloc_util.h b/erts/emulator/beam/erl_alloc_util.h index afdff1a71e..51af59e40c 100644 --- a/erts/emulator/beam/erl_alloc_util.h +++ b/erts/emulator/beam/erl_alloc_util.h @@ -72,6 +72,7 @@ typedef struct { void* (*mseg_alloc)(Allctr_t*, Uint *size_p, Uint flags); void* (*mseg_realloc)(Allctr_t*, void *seg, Uint old_size, Uint *new_size_p); void (*mseg_dealloc)(Allctr_t*, void *seg, Uint size, Uint flags); + ErtsMemMapper *mseg_mmapper; #endif void* (*sys_alloc)(Allctr_t *allctr, Uint size, int superalign); void* (*sys_realloc)(Allctr_t *allctr, void *ptr, Uint size, Uint old_size, int superalign); @@ -205,9 +206,9 @@ void* erts_alcu_literal_32_mseg_realloc(Allctr_t*, void *seg, Uint old_size, Uin void erts_alcu_literal_32_mseg_dealloc(Allctr_t*, void *seg, Uint size, Uint flags); # elif defined(ARCH_64) && defined(ERTS_HAVE_OS_PHYSICAL_MEMORY_RESERVATION) -void* erts_alcu_literal_64_mseg_alloc(Allctr_t*, Uint *size_p, Uint flags); -void* erts_alcu_literal_64_mseg_realloc(Allctr_t*, void *seg, Uint old_size, Uint *new_size_p); -void erts_alcu_literal_64_mseg_dealloc(Allctr_t*, void *seg, Uint size, Uint flags); +void* erts_alcu_mmapper_mseg_alloc(Allctr_t*, Uint *size_p, Uint flags); +void* erts_alcu_mmapper_mseg_realloc(Allctr_t*, void *seg, Uint old_size, Uint *new_size_p); +void erts_alcu_mmapper_mseg_dealloc(Allctr_t*, void *seg, Uint size, Uint flags); # endif #endif /* HAVE_ERTS_MSEG */ @@ -601,6 +602,7 @@ struct Allctr_t_ { void* (*mseg_alloc)(Allctr_t*, Uint *size_p, Uint flags); void* (*mseg_realloc)(Allctr_t*, void *seg, Uint old_size, Uint *new_size_p); void (*mseg_dealloc)(Allctr_t*, void *seg, Uint size, Uint flags); + ErtsMemMapper *mseg_mmapper; #endif void* (*sys_alloc)(Allctr_t *allctr, Uint size, int superalign); void* (*sys_realloc)(Allctr_t *allctr, void *ptr, Uint size, Uint old_size, int superalign); |