slightly improve sized deallocation error messages

pull/50/head
Daniel Micay 2018-10-05 01:05:40 -04:00
parent dcd969ae04
commit 3dc49f8f73
1 changed files with 2 additions and 2 deletions

View File

@ -411,7 +411,7 @@ static inline void deallocate_small(void *p, size_t *expected_size) {
struct size_class *c = &size_class_metadata[class]; struct size_class *c = &size_class_metadata[class];
size_t size = size_classes[class]; size_t size = size_classes[class];
if (expected_size && size != *expected_size) { if (expected_size && size != *expected_size) {
fatal_error("sized deallocation mismatch"); fatal_error("sized deallocation mismatch (small)");
} }
bool is_zero_size = size == 0; bool is_zero_size = size == 0;
if (is_zero_size) { if (is_zero_size) {
@ -767,7 +767,7 @@ static void deallocate_large(void *p, size_t *expected_size) {
} }
size_t size = region->size; size_t size = region->size;
if (expected_size && size != *expected_size) { if (expected_size && size != *expected_size) {
fatal_error("sized deallocation mismatch"); fatal_error("sized deallocation mismatch (large)");
} }
size_t guard_size = region->guard_size; size_t guard_size = region->guard_size;
regions_delete(region); regions_delete(region);