summaryrefslogtreecommitdiff
path: root/include/mimalloc-internal.h
diff options
context:
space:
mode:
authorDaan Leijen <Daan@microsoft.com>2019-09-10 13:26:51 -0700
committerDaan Leijen <Daan@microsoft.com>2019-09-10 13:26:51 -0700
commit1909cfb3462a72ef93ae8768e96c9ba07f273389 (patch)
treea7a4f6b92f9ff4733cd848605f5bc60dd5a8412f /include/mimalloc-internal.h
parentd278c26c0ec8fd919ad02b04b7151696942d2084 (diff)
refine mi_os_good_alloc_size and use it for huge pages (to ensure realloc is bounded as in #153
Diffstat (limited to 'include/mimalloc-internal.h')
-rw-r--r--include/mimalloc-internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/mimalloc-internal.h b/include/mimalloc-internal.h
index fd97b3e..8a81337 100644
--- a/include/mimalloc-internal.h
+++ b/include/mimalloc-internal.h
@@ -43,6 +43,7 @@ size_t _mi_os_page_size(void);
void _mi_os_init(void); // called from process init
void* _mi_os_alloc(size_t size, mi_stats_t* stats); // to allocate thread local data
void _mi_os_free(void* p, size_t size, mi_stats_t* stats); // to free thread local data
+size_t _mi_os_good_alloc_size(size_t size);
// memory.c
void* _mi_mem_alloc_aligned(size_t size, size_t alignment, bool* commit, bool* large, bool* is_zero, size_t* id, mi_os_tld_t* tld);