#pragma once #include #include #include namespace jni_hook { struct memory_block { static void *allocate(size_t sz); static void deallocate(void *, size_t) { /* Monotonic increase */ } static void release(); }; template using allocator = stateless_allocator; using string = std::basic_string, allocator>; // Use node_hash_map since it will use less memory because we are using a monotonic allocator template using hash_map = phmap::node_hash_map, phmap::priv::hash_default_eq, allocator> >; template using tree_map = std::map, allocator> >; } // namespace jni_hook // Provide heterogeneous lookup for jni_hook::string namespace phmap::priv { template <> struct HashEq : StringHashEqT {}; } // namespace phmap::priv