Loading...
--- libmalloc/libmalloc-646.40.3/src/internal.h
+++ libmalloc/libmalloc-521.100.59/src/internal.h
@@ -110,9 +110,6 @@
# if !MALLOC_TARGET_EXCLAVES_INTROSPECTOR
typedef void plat_map_t;
# else
-# if !defined(__x86_64__)
-# include <l4/l4.h>
-# endif // !defined(__x86_64__)
typedef plat_map_exclaves_t plat_map_t;
# endif // !MALLOC_TARGET_EXCLAVES_INTROSPECTOR
#else
@@ -205,13 +202,11 @@
#include <sys/mman.h>
#include <sys/queue.h>
#if !MALLOC_TARGET_EXCLAVES
-# include <sys/codesign.h>
# include <sys/event.h>
# include <sys/param.h>
# include <sys/stat.h>
# include <sys/sysctl.h>
# include <sys/random.h>
-# include <sys/csr.h>
#else
# include <vas/vas.h>
# define howmany(x, y) ((((x) % (y)) == 0) ? ((x) / (y)) : (((x) / (y)) + 1))
@@ -219,7 +214,6 @@
# define roundup(x, y) ((((x) % (y)) == 0) ? \
(x) : ((x) + ((y) - ((x) % (y)))))
#endif // !MALLOC_TARGET_EXCLAVES
-#define rounddown(x,y) (((x)/(y))*(y))
#include <sys/types.h>
#if !MALLOC_TARGET_EXCLAVES
# include <sys/ulock.h>
@@ -290,9 +284,7 @@
#endif // !MALLOC_TARGET_EXCLAVES && MALLOC_TARGET_EXCLAVES_INTROSPECTOR
#include "xzone/xzone_introspect.h"
#include "xzone/xzone_malloc.h"
-#if !(MALLOC_TARGET_EXCLAVES_INTROSPECTOR && defined(__x86_64__))
-# include "xzone/xzone_inline_internal.h"
-#endif // !(MALLOC_TARGET_EXCLAVES_INTROSPECTOR && defined(__x86_64__))
+#include "xzone/xzone_inline_internal.h"
#if !MALLOC_TARGET_EXCLAVES
# include "stack_logging.h"
# include "stack_trace.h"
@@ -385,31 +377,31 @@
#endif
MALLOC_NOEXPORT
-void * __sized_by_or_null(size)
+void *
_malloc_zone_malloc(malloc_zone_t *zone, size_t size, malloc_zone_options_t mzo) __alloc_size(2);
MALLOC_NOEXPORT
-void * __sized_by_or_null(num_items * size)
+void *
_malloc_zone_calloc(malloc_zone_t *zone, size_t num_items, size_t size, malloc_zone_options_t mzo) __alloc_size(2,3);
MALLOC_NOEXPORT
-void * __sized_by_or_null(size)
+void *
_malloc_zone_valloc(malloc_zone_t *zone, size_t size, malloc_zone_options_t mzo) __alloc_size(2);
MALLOC_NOEXPORT
-void * __sized_by_or_null(size)
+void *
_malloc_zone_realloc(malloc_zone_t *zone, void * __unsafe_indexable ptr,
size_t size, malloc_type_descriptor_t type_desc) __alloc_size(3);
MALLOC_NOEXPORT
-void * __sized_by_or_null(size)
+void *
_malloc_zone_memalign(malloc_zone_t *zone, size_t alignment, size_t size,
malloc_zone_options_t mzo, malloc_type_descriptor_t type_desc)
__alloc_align(2) __alloc_size(3);
#if !MALLOC_TARGET_EXCLAVES
MALLOC_NOEXPORT
-void * __sized_by_or_null(size)
+void *
_malloc_zone_malloc_with_options_np_outlined(malloc_zone_t *zone, size_t align,
size_t size, malloc_options_np_t options)
__alloc_align(2) __alloc_size(3);
@@ -427,13 +419,8 @@
#endif // DARWINTEST || MALLOC_BUILDING_XCTESTS
MALLOC_NOEXPORT
-void * __sized_by_or_null(new_size)
+void *
_realloc(void * __unsafe_indexable in_ptr, size_t new_size) __alloc_size(2);
-
-MALLOC_NOEXPORT
-malloc_zone_t *
-find_registered_zone(const void * __unsafe_indexable ptr, size_t *returned_size,
- bool known_non_default);
MALLOC_NOEXPORT
int
@@ -555,6 +542,7 @@
typedef void (*set_msl_lite_hooks_callout_t) (struct _malloc_msl_lite_hooks_s *hooksp, size_t size);
void set_msl_lite_hooks(set_msl_lite_hooks_callout_t callout);
+
static MALLOC_INLINE void
yield(void)
{
@@ -566,19 +554,4 @@
#endif // !MALLOC_TARGET_EXCLAVES
}
-#if CONFIG_FEATUREFLAGS_SIMPLE
-#if TARGET_OS_SIMULATOR
-#define malloc_secure_feature_enabled(name, fallback, simulator_default) \
- (simulator_default)
-#elif CONFIG_CHECK_SECURITY_POLICY
-// TODO: Do we want the secure fallback to be the same as the no-ff fallback?
-#define malloc_secure_feature_enabled(name, fallback, simulator_default) \
- (malloc_internal_security_policy ? \
- os_feature_enabled_simple(libmalloc, name, fallback) : (fallback))
-#else
-#define malloc_secure_feature_enabled(name, fallback, simulator_default) \
- os_feature_enabled_simple(libmalloc, name, fallback)
-#endif // TARGET_OS_SIMULATOR
-#endif // CONFIG_FEATUREFLAGS_SIMPLE
-
#endif // __INTERNAL_H