bmalloc should use JSC VM tag for gigacage
[WebKit-https.git] / Source / WTF / wtf / VMTags.h
index 4cf7819..14e021f 100644 (file)
 
 #pragma once
 
-// On Mac OS X, the VM subsystem allows tagging memory requested from mmap and vm_map
-// in order to aid tools that inspect system memory use. 
-#if OS(DARWIN)
-
-#include <mach/vm_statistics.h>
-
-#if defined(VM_MEMORY_TCMALLOC)
-#define VM_TAG_FOR_TCMALLOC_MEMORY VM_MAKE_TAG(VM_MEMORY_TCMALLOC)
-#else
-#define VM_TAG_FOR_TCMALLOC_MEMORY VM_MAKE_TAG(53)
-#endif // defined(VM_MEMORY_TCMALLOC)
-
-#if defined(VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR)
-#define VM_TAG_FOR_EXECUTABLEALLOCATOR_MEMORY VM_MAKE_TAG(VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR)
-#else
-#define VM_TAG_FOR_EXECUTABLEALLOCATOR_MEMORY VM_MAKE_TAG(64)
-#endif // defined(VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR)
-
-#if defined(VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE)
-#define VM_TAG_FOR_REGISTERFILE_MEMORY VM_MAKE_TAG(VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE)
-#else
-#define VM_TAG_FOR_REGISTERFILE_MEMORY VM_MAKE_TAG(65)
-#endif // defined(VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE)
-
-#if defined(VM_MEMORY_JAVASCRIPT_CORE)
-#define VM_TAG_FOR_WEBASSEMBLY_MEMORY VM_MAKE_TAG(VM_MEMORY_JAVASCRIPT_CORE)
-#else
-#define VM_TAG_FOR_WEBASSEMBLY_MEMORY VM_MAKE_TAG(63)
-#endif // defined(VM_MEMORY_JAVASCRIPT_CORE)
-
-#else // OS(DARWIN)
+#if defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC
 
 #define VM_TAG_FOR_TCMALLOC_MEMORY -1
 #define VM_TAG_FOR_WEBASSEMBLY_MEMORY -1
 #define VM_TAG_FOR_EXECUTABLEALLOCATOR_MEMORY -1
 #define VM_TAG_FOR_REGISTERFILE_MEMORY -1
 
-#endif // OS(DARWIN)
+#else
+
+#include <bmalloc/BVMTags.h>
+
+#endif