diff options
| author | Nick Barnes | 2001-10-31 14:40:56 +0000 |
|---|---|---|
| committer | Nick Barnes | 2001-10-31 14:40:56 +0000 |
| commit | 7acfca905d76140f4cc0b09c9a12de237de364cd (patch) | |
| tree | 3ed8babfa3a73d30f29e08ca5d5adcda4ca4e826 /mps/code/boot.h | |
| parent | b7ce4893f9902d57cd67ac9a92fa6c3d5a8fc833 (diff) | |
| download | emacs-7acfca905d76140f4cc0b09c9a12de237de364cd.tar.gz emacs-7acfca905d76140f4cc0b09c9a12de237de364cd.zip | |
Branch imports for masters.
Copied from Perforce
Change: 23678
ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code/boot.h')
| -rw-r--r-- | mps/code/boot.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/mps/code/boot.h b/mps/code/boot.h new file mode 100644 index 00000000000..04b1c80d0f0 --- /dev/null +++ b/mps/code/boot.h | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | /* impl.h.boot: BOOTSTRAP ALLOCATOR INTERFACE | ||
| 2 | * | ||
| 3 | * $HopeName: MMsrc!boot.h(MMdevel_pekka_locus.2) $ | ||
| 4 | * Copyright (C) 2000 Harlequin Limited. All rights reserved. | ||
| 5 | * | ||
| 6 | * .overview: A protocol for allocating memory from a given block. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef boot_h | ||
| 10 | #define boot_h | ||
| 11 | |||
| 12 | #include "mpmtypes.h" | ||
| 13 | |||
| 14 | |||
| 15 | /* BootBlockStruct -- descriptor of the block to allocate from */ | ||
| 16 | |||
| 17 | typedef struct BootBlockStruct | ||
| 18 | { | ||
| 19 | Sig sig; | ||
| 20 | void *base; | ||
| 21 | void *alloc; | ||
| 22 | void *limit; | ||
| 23 | } BootBlockStruct; | ||
| 24 | |||
| 25 | |||
| 26 | extern Res BootBlockInit(BootBlockStruct *boot, void *base, void *limit); | ||
| 27 | extern void BootBlockFinish(BootBlock boot); | ||
| 28 | extern Res BootAlloc(void **pReturn, BootBlock boot, size_t size, | ||
| 29 | size_t align); | ||
| 30 | extern size_t BootAllocated(BootBlock boot); | ||
| 31 | extern Bool BootBlockCheck(BootBlock boot); | ||
| 32 | |||
| 33 | |||
| 34 | #endif /* boot_h */ | ||