Loading...
private/stack_logging.h libmalloc-283.100.6 libmalloc-521.100.59
--- libmalloc/libmalloc-283.100.6/private/stack_logging.h
+++ libmalloc/libmalloc-521.100.59/private/stack_logging.h
@@ -23,20 +23,28 @@
 #ifndef _STACK_LOGGING_H_
 #define _STACK_LOGGING_H_
 
-#import <stdbool.h>
-#import <malloc/malloc.h>
-#import <mach/vm_statistics.h>
-#import <sys/cdefs.h>
-#import <os/availability.h>
-
-
-/*********	MallocStackLogging permanant SPIs  ************/
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <malloc/malloc.h>
+#include <mach/boolean.h>
+#include <mach/mach_types.h>
+#include <mach/vm_statistics.h>
+#include <sys/cdefs.h>
+#include <os/availability.h>
+
+
+/*********	MallocStackLogging permanent SPIs  ************/
 
 #define stack_logging_type_free		0
 #define stack_logging_type_generic	1	/* anything that is not allocation/deallocation */
 #define stack_logging_type_alloc	2	/* malloc, realloc, etc... */
 #define stack_logging_type_dealloc	4	/* free, realloc, etc... */
 #define stack_logging_type_vm_allocate  16      /* vm_allocate or mmap */
+    /* NOTE: the stack_logging_type_vm_allocate type also contains
+     * the VM region's user_tag in the top byte, so it is not valid to check
+     * type == stack_logging_type_vm_allocate. The user_tag can be accessed
+     * using VM_GET_FLAGS_ALIAS */
 #define stack_logging_type_vm_deallocate  32	/* vm_deallocate or munmap */
 #define stack_logging_type_mapped_file_or_shared_mem	128