Expand (or shrink) in place (or fail)
| 664 | |
| 665 | // Expand (or shrink) in place (or fail) |
| 666 | void* mi_expand(void* p, size_t newsize) mi_attr_noexcept { |
| 667 | #if MI_PADDING |
| 668 | // we do not shrink/expand with padding enabled |
| 669 | MI_UNUSED(p); MI_UNUSED(newsize); |
| 670 | return NULL; |
| 671 | #else |
| 672 | if (p == NULL) return NULL; |
| 673 | const size_t size = _mi_usable_size(p,"mi_expand"); |
| 674 | if (newsize > size) return NULL; |
| 675 | return p; // it fits |
| 676 | #endif |
| 677 | } |
| 678 | |
| 679 | void* _mi_heap_realloc_zero(mi_heap_t* heap, void* p, size_t newsize, bool zero) mi_attr_noexcept { |
| 680 | // if p == NULL then behave as malloc. |
no test coverage detected