-
- return (&zone);
-}
-
-static size_t
-ozone_size(malloc_zone_t *zone, void *ptr)
-{
- size_t ret;
-
- ret = ivsalloc(ptr);
- if (ret == 0)
- ret = szone.size(zone, ptr);
-
- return (ret);
-}
-
-static void
-ozone_free(malloc_zone_t *zone, void *ptr)
-{
-
- if (ivsalloc(ptr) != 0)
- JEMALLOC_P(free)(ptr);
- else {
- size_t size = szone.size(zone, ptr);
- if (size != 0)
- (szone.free)(zone, ptr);
- }
-}
-
-static void *
-ozone_realloc(malloc_zone_t *zone, void *ptr, size_t size)
-{
- size_t oldsize;
-
- if (ptr == NULL)
- return (JEMALLOC_P(malloc)(size));
-
- oldsize = ivsalloc(ptr);
- if (oldsize != 0)
- return (JEMALLOC_P(realloc)(ptr, size));
- else {
- oldsize = szone.size(zone, ptr);
- if (oldsize == 0)
- return (JEMALLOC_P(malloc)(size));
- else {
- void *ret = JEMALLOC_P(malloc)(size);
- if (ret != NULL) {
- memcpy(ret, ptr, (oldsize < size) ? oldsize :
- size);
- (szone.free)(zone, ptr);
- }
- return (ret);
- }
- }
-}
-
-static unsigned
-ozone_batch_malloc(malloc_zone_t *zone, size_t size, void **results,
- unsigned num_requested)
-{
-
- /* Don't bother implementing this interface, since it isn't required. */
- return (0);
-}
-
-static void
-ozone_batch_free(malloc_zone_t *zone, void **to_be_freed, unsigned num)
-{
- unsigned i;
-
- for (i = 0; i < num; i++)
- ozone_free(zone, to_be_freed[i]);
-}
-
-#if (JEMALLOC_ZONE_VERSION >= 6)
-static void
-ozone_free_definite_size(malloc_zone_t *zone, void *ptr, size_t size)
-{
-
- if (ivsalloc(ptr) != 0) {
- assert(ivsalloc(ptr) == size);
- JEMALLOC_P(free)(ptr);
- } else {
- assert(size == szone.size(zone, ptr));
- szone.free_definite_size(zone, ptr, size);
- }
-}
+#if (JEMALLOC_ZONE_VERSION >= 7)
+ zone_introspect.enable_discharge_checking = NULL;
+ zone_introspect.disable_discharge_checking = NULL;
+ zone_introspect.discharge = NULL;
+#ifdef __BLOCKS__
+ zone_introspect.enumerate_discharged_pointers = NULL;
+#else
+ zone_introspect.enumerate_unavailable_without_blocks = NULL;
+#endif