Loading...
--- libmalloc/libmalloc-409.60.6/private/make_tapi_happy.h
+++ libmalloc/libmalloc-646.40.3/private/make_tapi_happy.h
@@ -21,8 +21,36 @@
* @APPLE_LICENSE_HEADER_END@
*/
+#include <stdbool.h>
+
/* Make TAPI happy by declaring things that other projects forward-declare. */
/* This header is not installed anywhere. */
+
+#include <malloc/malloc.h>
+
+typedef malloc_zone_t *xzm_malloc_zone_t;
+typedef uint8_t xzm_segment_group_id_t;
+typedef uint8_t xzm_xzone_bucket_t;
+extern malloc_zone_t **malloc_zones;
+
+#if defined(__LP64__)
+extern const struct malloc_introspection_t xzm_malloc_zone_introspect;
+
+bool
+xzm_ptr_lookup_4test(xzm_malloc_zone_t zone, void *ptr,
+ xzm_segment_group_id_t *sgid_out, xzm_xzone_bucket_t *bucket_out);
+
+uint8_t
+xzm_type_choose_ptr_bucket_4test(const union xzm_bucketing_keys_u *const keys,
+ uint8_t ptr_bucket_count, malloc_type_descriptor_t type_desc);
+
+#endif // defined(__LP64__)
+
+#if __is_target_environment(exclavecore) || __is_target_environment(exclavekit)
+
+extern unsigned malloc_num_zones;
+
+#else
/* For Libsystem */
void _malloc_fork_child(void);
@@ -52,7 +80,6 @@
uint32_t num_hot_frames_to_skip);
extern int32_t malloc_num_zones;
extern int32_t malloc_num_zones_allocated;
-extern malloc_zone_t **malloc_zones;
extern malloc_logger_t *malloc_logger;
extern unsigned malloc_check_start;
extern unsigned malloc_check_counter;
@@ -85,3 +112,4 @@
/* For debugging */
void tiny_print_region_free_list(void *ptr, unsigned int slot);
+#endif // !__is_target_environment(exclavekit)