libdislocator, introduces malloc_good_size for Darwin.

This commit is contained in:
David Carlier
2022-06-02 21:48:15 +01:00
parent 7413316496
commit 6afccdebcd

View File

@ -520,6 +520,14 @@ size_t malloc_usable_size(const void *ptr) {
}
#if defined(__APPLE__)
size_t malloc_good_size(size_t len) {
return (len & ~(ALLOC_ALIGN_SIZE - 1)) + ALLOC_ALIGN_SIZE;
}
#endif
__attribute__((constructor)) void __dislocator_init(void) {
char *tmp = getenv("AFL_LD_LIMIT_MB");