mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-03 22:19:32 +03:00
Compare commits
4 commits
9a318f83e0
...
f8c4d390b0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f8c4d390b0 | ||
![]() |
fae61ed946 | ||
![]() |
a5298dd48f | ||
![]() |
7543e8989a |
1 changed files with 4 additions and 1 deletions
|
@ -340,7 +340,10 @@ mi_decl_nodiscard size_t mi_usable_size(const void* p) mi_attr_noexcept {
|
|||
|
||||
void mi_free_size(void* p, size_t size) mi_attr_noexcept {
|
||||
MI_UNUSED_RELEASE(size);
|
||||
mi_assert(p == NULL || size <= _mi_usable_size(p,"mi_free_size"));
|
||||
#if MI_DEBUG
|
||||
const size_t available = _mi_usable_size(p,"mi_free_size");
|
||||
mi_assert(p == NULL || size <= available || available == 0 /* invalid pointer */ );
|
||||
#endif
|
||||
mi_free(p);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue