|
|
1.1 root 1: /* (-lgl
2: * COHERENT Version 3.0
3: * Copyright (c) 1982, 1990 by Mark Williams Company.
4: * All rights reserved. May not be copied without permission.
5: -lgl) */
6: /*
7: * Kernel memory allocator.
8: */
9:
10: #ifndef __SYS_ALLOC_H__
11: #define __SYS_ALLOC_H__
12:
13: #include <common/feature.h>
14: #include <common/ccompat.h>
15: #include <common/__size.h>
16: #include <common/__parith.h>
17:
18: #if ! __KERNEL__
19: # error You must be compiling the kernel to use this header
20: #endif
21:
22: #define NEXT_FIT 1
23:
24: /*
25: * Structure for allocator.
26: */
27:
28: #if NEXT_FIT
29:
30: typedef struct _heap heap_t;
31:
32: #else
33:
34: typedef __VOID__ * heap_t;
35:
36: #endif
37:
38:
39: __EXTERN_C_BEGIN__
40:
41: heap_t * setarena __PROTO ((__VOID__ * _base, __size_t _size));
42: __VOID__ * alloc __PROTO ((heap_t * _arena, __size_t _size));
43:
44: __EXTERN_C_END__
45:
46: #endif /* ! defined (__SYS_ALLOC_H__) */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.