The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/vm/vm_zone.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * Copyright (c) 1997, 1998 John S. Dyson
    3  * All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  * 1. Redistributions of source code must retain the above copyright
    9  *      notice immediately at the beginning of the file, without modification,
   10  *      this list of conditions, and the following disclaimer.
   11  * 2. Absolutely no warranty of function or purpose is made by the author
   12  *      John S. Dyson.
   13  *
   14  * $FreeBSD$
   15  */
   16 
   17 #ifndef _SYS_ZONE_H
   18 
   19 #define _SYS_ZONE_H
   20 
   21 #define ZONE_INTERRUPT 0x0001   /* If you need to allocate at int time */
   22 #define ZONE_PANICFAIL 0x0002   /* panic if the zalloc fails */
   23 #define ZONE_BOOT      0x0010   /* Internal flag used by zbootinit */
   24 
   25 #include        <machine/lock.h>
   26 
   27 typedef struct vm_zone {
   28         struct simplelock zlock;        /* lock for data structure */
   29         void            *zitems;        /* linked list of items */
   30         int             zfreecnt;       /* free entries */
   31         int             zfreemin;       /* minimum number of free entries */
   32         int             znalloc;        /* number of allocations */
   33         vm_offset_t     zkva;           /* Base kva of zone */
   34         int             zpagecount;     /* Total # of allocated pages */
   35         int             zpagemax;       /* Max address space */
   36         int             zmax;           /* Max number of entries allocated */
   37         int             ztotal;         /* Total entries allocated now */
   38         int             zsize;          /* size of each entry */
   39         int             zalloc;         /* hint for # of pages to alloc */
   40         int             zflags;         /* flags for zone */
   41         int             zallocflag;     /* flag for allocation */
   42         struct vm_object *zobj;         /* object to hold zone */
   43         char            *zname;         /* name for diags */
   44         struct vm_zone  *znext;         /* list of zones for sysctl */
   45 } *vm_zone_t;
   46 
   47 
   48 void            zerror __P((int)) __dead2;
   49 vm_zone_t       zinit __P((char *name, int size, int nentries, int flags,
   50                            int zalloc));
   51 int             zinitna __P((vm_zone_t z, struct vm_object *obj, char *name,
   52                              int size, int nentries, int flags, int zalloc));
   53 void *          zalloc __P((vm_zone_t z));
   54 void            zfree __P((vm_zone_t z, void *item));
   55 void *          zalloci __P((vm_zone_t z));
   56 void            zfreei __P((vm_zone_t z, void *item));
   57 void            zbootinit __P((vm_zone_t z, char *name, int size, void *item,
   58                                int nitems));
   59 void *          _zget __P((vm_zone_t z));
   60 
   61 #endif /* _SYS_ZONE_H */

Cache object: d14307d9e0b1cc32c816a0e6031457ee


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.