/*
- * Copyright (c) 2000-2010 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2014 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
#ifdef MACH_KERNEL_PRIVATE
#include <zone_debug.h>
-#include <kern/lock.h>
#include <kern/locks.h>
#include <kern/queue.h>
#include <kern/thread_call.h>
/* boolean_t */ collectable :1, /* (F) garbage collect empty pages */
/* boolean_t */ expandable :1, /* (T) expand zone (with message)? */
/* boolean_t */ allows_foreign :1, /* (F) allow non-zalloc space */
- /* boolean_t */ doing_alloc :1, /* is zone expanding now? */
+ /* boolean_t */ doing_alloc_without_vm_priv:1, /* is zone expanding now via a non-vm_privileged thread? */
+ /* boolean_t */ doing_alloc_with_vm_priv:1, /* is zone expanding now via a vm_privileged thread? */
/* boolean_t */ waiting :1, /* is thread waiting for expansion? */
/* boolean_t */ async_pending :1, /* asynchronous allocation pending? */
/* boolean_t */ zleak_on :1, /* Are we collecting allocation information? */
/* boolean_t */ gzalloc_exempt :1,
/* boolean_t */ alignment_required :1,
/* boolean_t */ use_page_list :1,
- /* future */ _reserved :16;
+ /* future */ _reserved :15;
int index; /* index into zone_info arrays for this zone */
struct zone *next_zone; /* Link for all-zones list */
#ifdef XNU_KERNEL_PRIVATE
+extern vm_offset_t zone_map_min_address;
+extern vm_offset_t zone_map_max_address;
+
+
/* Allocate from zone */
extern void * zalloc(
zone_t zone);
const char *name); /* a name for the zone */
+/* Non-waiting for memory version of zalloc */
+extern void * zalloc_nopagewait(
+ zone_t zone);
+
/* Non-blocking version of zalloc */
extern void * zalloc_noblock(
zone_t zone);
-/* direct (non-wrappered) interface */
+/* selective version of zalloc */
extern void * zalloc_canblock(
zone_t zone,
boolean_t canblock);