Loading...
--- libmalloc/libmalloc-283.100.5/src/nano_malloc.c
+++ libmalloc/libmalloc-166.200.60/src/nano_malloc.c
@@ -1523,9 +1523,9 @@
}
// TODO sanity checks
-static unsigned nanozone_check_counter = 0;
-static unsigned nanozone_check_start = 0;
-static unsigned nanozone_check_modulo = 1;
+unsigned nanozone_check_counter = 0;
+unsigned nanozone_check_start = 0;
+unsigned nanozone_check_modulo = 1;
static boolean_t
nano_check_all(nanozone_t *nanozone, const char *function)
@@ -1896,12 +1896,9 @@
mprotect(nanozone, sizeof(nanozone->basic_zone), PROT_READ); /* Prevent overwriting the function pointers in basic_zone. */
/* Nano zone does not support MALLOC_ADD_GUARD_PAGES. */
- if (debug_flags & MALLOC_ALL_GUARD_PAGE_FLAGS) {
- if (!(debug_flags & MALLOC_GUARD_ALL)) {
- // Don't report when MallocGuardEdges == "all".
- malloc_report(ASL_LEVEL_INFO, "nano zone does not support guard pages\n");
- }
- debug_flags &= ~MALLOC_ALL_GUARD_PAGE_FLAGS;
+ if (debug_flags & MALLOC_ADD_GUARD_PAGES) {
+ malloc_report(ASL_LEVEL_INFO, "nano zone does not support guard pages\n");
+ debug_flags &= ~MALLOC_ADD_GUARD_PAGES;
}
/* set up the remainder of the nanozone structure */