mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-05-06 08:15:35 -04:00
add sized deallocation support
This commit is contained in:
parent
82314f4471
commit
cf449b3df4
2 changed files with 29 additions and 6 deletions
3
malloc.h
3
malloc.h
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue