summaryrefslogtreecommitdiff
path: root/src/alloc-posix.c
diff options
context:
space:
mode:
authorDaan <daanl@outlook.com>2021-11-02 21:52:00 -0700
committerDaan <daanl@outlook.com>2021-11-02 21:52:00 -0700
commit5360639748d8bfc7f7e97728e859a6380ac7db9f (patch)
tree8783c8e6b31ad146ae690228a97e6edafc8aed33 /src/alloc-posix.c
parent74efd6ddac0215c3b4d54c13563765a97b4e971e (diff)
add mi_malloc_good_size
Diffstat (limited to 'src/alloc-posix.c')
-rw-r--r--src/alloc-posix.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/alloc-posix.c b/src/alloc-posix.c
index 43931e5..cff01b5 100644
--- a/src/alloc-posix.c
+++ b/src/alloc-posix.c
@@ -33,13 +33,19 @@ terms of the MIT license. A copy of the license can be found in the file
size_t mi_malloc_size(const void* p) mi_attr_noexcept {
+ //if (!mi_is_in_heap_region(p)) return 0;
return mi_usable_size(p);
}
size_t mi_malloc_usable_size(const void *p) mi_attr_noexcept {
+ //if (!mi_is_in_heap_region(p)) return 0;
return mi_usable_size(p);
}
+size_t mi_malloc_good_size(size_t size) mi_attr_noexcept {
+ return mi_good_size(size);
+}
+
void mi_cfree(void* p) mi_attr_noexcept {
if (mi_is_in_heap_region(p)) {
mi_free(p);