1: /*
   2:  * Copyright (c) 1982, 1986 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)map.h	7.1 (Berkeley) 6/4/86
   7:  */
   8: 
   9: /*
  10:  * Resource Allocation Maps.
  11:  *
  12:  * Associated routines manage sub-allocation of an address space using
  13:  * an array of segment descriptors.  The first element of this array
  14:  * is a map structure, describing the arrays extent and the name
  15:  * of the controlled object.  Each additional structure represents
  16:  * a free segment of the address space.
  17:  *
  18:  * A call to rminit initializes a resource map and may also be used
  19:  * to free some address space for the map.  Subsequent calls to rmalloc
  20:  * and rmfree allocate and free space in the resource map.  If the resource
  21:  * map becomes too fragmented to be described in the available space,
  22:  * then some of the resource is discarded.  This may lead to critical
  23:  * shortages, but is better than not checking (as the previous versions
  24:  * of these routines did) or giving up and calling panic().  The routines
  25:  * could use linked lists and call a memory allocator when they run
  26:  * out of space, but that would not solve the out of space problem when
  27:  * called at interrupt time.
  28:  *
  29:  * N.B.: The address 0 in the resource address space is not available
  30:  * as it is used internally by the resource map routines.
  31:  */
  32: struct map {
  33:     struct  mapent *m_limit;    /* address of last slot in map */
  34:     char    *m_name;        /* name of resource */
  35: /* we use m_name when the map overflows, in warning messages */
  36: };
  37: struct mapent
  38: {
  39:     int m_size;     /* size of this segment of the map */
  40:     int m_addr;     /* resource-space addr of start of segment */
  41: };
  42: 
  43: #ifdef KERNEL
  44: struct  map *swapmap;
  45: int nswapmap;
  46: struct  map *argmap;
  47: #define ARGMAPSIZE  16
  48: struct  map *kernelmap;
  49: struct  map *mbmap;
  50: #endif

Defined variables

mbmap defined in line 49; used 4 times
nswapmap defined in line 45; used 2 times

Defined struct's

map defined in line 32; used 28 times
mapent defined in line 37; used 25 times

Defined macros

ARGMAPSIZE defined in line 47; used 2 times

Usage of this include

map.h used 51 times
Last modified: 1986-06-05
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 826
Valid CSS Valid XHTML 1.0 Strict