]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/kern/zalloc.h
xnu-3248.30.4.tar.gz
[apple/xnu.git] / osfmk / kern / zalloc.h
index 19110a16590e32d2714c2c96bf23c4de4ba4c6de..5446890558b3bc59a3c7607cbbdb3ee662240373 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2010 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2014 Apple Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
@@ -74,7 +74,6 @@
 #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>
@@ -121,7 +120,8 @@ struct zone {
        /* 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? */
@@ -133,7 +133,7 @@ struct zone {
        /* 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 */
@@ -214,6 +214,10 @@ __BEGIN_DECLS
 
 #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);
@@ -231,11 +235,15 @@ extern zone_t     zinit(
                                        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);