Loading...
--- libmalloc/libmalloc-283.100.6/src/vm.h
+++ libmalloc/libmalloc-474.0.13/src/vm.h
@@ -28,7 +28,8 @@
static inline bool
mvm_aslr_enabled(void)
{
- return _dyld_get_image_slide((const struct mach_header *)_NSGetMachExecuteHeader()) != 0;
+ extern struct mach_header __dso_handle;
+ return _dyld_get_image_slide(&__dso_handle);
}
MALLOC_NOEXPORT
@@ -51,4 +52,22 @@
void
mvm_protect(void *address, size_t size, unsigned protection, unsigned debug_flags);
+#if CONFIG_DEFERRED_RECLAIM
+MALLOC_NOEXPORT
+kern_return_t
+mvm_deferred_reclaim_init(void);
+
+MALLOC_NOEXPORT
+bool
+mvm_reclaim_mark_used(uint64_t id, mach_vm_address_t ptr, uint32_t size, unsigned int debug_flags);
+
+MALLOC_NOEXPORT
+uint64_t
+mvm_reclaim_mark_free(vm_address_t ptr, uint32_t size, unsigned int debug_flags);
+
+MALLOC_NOEXPORT
+bool
+mvm_reclaim_is_available(uint64_t id);
+#endif // CONFIG_DEFERRED_RECLAIM
+
#endif // __VM_H