1 /* BEGIN INCLUDE FILE area_structures.incl.pl1  10/75 */
 2 /* Modified September 1981 by J. Bongiovanni for allocation_p_clock */
 3 
 4 dcl  area_version_1 fixed bin static init (1);              /* version number for this area format */
 5 
 6 dcl  areap ptr;
 7 
 8 dcl 1 area_header aligned based (areap),
 9     2 version fixed bin (35),                               /* 0 for buddy system, 1 for current areas */
10     2 last_usable bit (18),                                 /* rel pointer to end of area */
11     2 next_virgin bit (18),                                 /* rel pointer to next slot in virgin territory */
12     2 flags,
13       3 extend bit (1) unal,                                /* says area is extensible */
14       3 zero_on_alloc bit (1) unal,                         /* says to zero after allocation */
15       3 zero_on_free bit (1) unal,                          /* says to zero after freeing */
16       3 dont_free bit (1) unal,                             /* dont honor free request -- debugging tool */
17       3 defined_by_call bit (1) unal,                       /* says area seg got via define_area_ call */
18       3 system bit (1) unal,                                /* ayss area is managed by the system */
19       3 mbz bit (30) unal,
20     2 allocation_method fixed bin,                          /* 0 is standard, 1 is no_freeing method */
21     2 last_size bit (18),                                   /* size of last allocated block before virgin territory */
22     2 last_block bit (18),                                  /* rel pointer to last allocated block before virgin territory */
23     2 freep (3:16),                                         /* free list info */
24       3 relp bit (18) unal,                                 /* pointer to first block on list */
25       3 max_block_size bit (18) unal,                       /* size of largest block on list, if known. else zero */
26     2 allocation_p_clock bit (36) aligned,                  /* counter to prevent IPS race */
27     2 extend_info bit (18) unal,                            /* offset to extend info block */
28     2 recovery_info bit (18) unal,                          /* eventually will hold recovery info relp */
29     2 n_allocated fixed bin (17) unal,                      /* number of allocated blocks */
30     2 n_free fixed bin (17) unal;                           /* number of free blocks */
31 
32 dcl (STANDARD_ALLOCATION_METHOD init (0),
33      NO_FREEING_ALLOCATION_METHOD init (1)
34      ) fixed bin internal static;
35 
36 dcl  extend_blockp ptr;
37 
38 dcl 1 extend_block aligned based (extend_blockp),           /* contents of extend block for extensible areas */
39     2 first_area ptr unal,                                  /* pointer to first area */
40     2 next_area ptr unal,                                   /* pointer to next area in chain */
41     2 sequence_no fixed bin,                                /* sequence number for this component */
42     2 name char (32),                                       /* owner of the area */
43     2 pad fixed;                                            /* brings it to an even, 12 word allocation */
44 
45 dcl alloc_blkhdrsz static internal init(2);
46 dcl 1 no_free_area_header aligned based(areap),             /* overlay for no_free areas */
47     2 pad(4) ptr,
48     2 current_component ptr;                                /* points to component from which we are allocating */
49 
50 dcl  blockp ptr;
51 
52 dcl 1 block aligned based (blockp),                         /* declaration for block header */
53     2 prev_size bit (18) unal,                              /* size of preceding block */
54     2 cur_size bit (18) unal,                               /* size of current block */
55     2 buddy_pad bit (8) unal,                               /* non_zero for buddy system area */
56     2 prev_busy bit (1) unal,                               /* previous-block-is-used flag */
57     2 marked bit (1) unal,
58     2 q_no bit (8) unal,                                    /* stratum number when in free list */
59     2 header bit (18) unal,                                 /* pointer to head of area */
60     2 fp bit (18) unal,                                     /* forward free list thread */
61     2 bp bit (18) unal;                                     /* backward free list thread */
62 
63 dcl  min_block_size fixed bin static init (8);              /* minimum allowed block size */
64 
65 /* END INCLUDE FILE area_structures.incl.pl1 */