diff options
Diffstat (limited to 'src/alloc-posix.c')
-rw-r--r-- | src/alloc-posix.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/alloc-posix.c b/src/alloc-posix.c index 6465304..6627d2b 100644 --- a/src/alloc-posix.c +++ b/src/alloc-posix.c @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------------------- -Copyright (c) 2018,2019, Microsoft Research, Daan Leijen +Copyright (c) 2018-2021, Microsoft Research, Daan Leijen This is free software; you can redistribute it and/or modify it under the terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. @@ -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); |