add sized deallocation support

This commit is contained in:
Daniel Micay 2018-09-18 17:28:52 -04:00
parent 82314f4471
commit cf449b3df4
2 changed files with 29 additions and 6 deletions

View file

@ -34,6 +34,7 @@
#define h_malloc_object_size malloc_object_size
#define h_malloc_object_size_fast malloc_object_size_fast
#define h_free_sized free_sized
#endif
// C standard
@ -84,4 +85,6 @@ size_t h_malloc_object_size(void *ptr);
// similar to malloc_object_size, but avoiding locking so the results are much more limited
size_t h_malloc_object_size_fast(void *ptr);
void h_free_sized(void *ptr, size_t expected_size);
#endif