diff options
Diffstat (limited to 'src/memory.h')
-rw-r--r-- | src/memory.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/memory.h b/src/memory.h new file mode 100644 index 00000000..8c759f3d --- /dev/null +++ b/src/memory.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved. | ||
2 | * | ||
3 | * See the LICENSE file | ||
4 | * | ||
5 | * The origin of this software must not be misrepresented, either by | ||
6 | * explicit claim or by omission. Since few users ever read sources, | ||
7 | * credits must appear in the documentation. | ||
8 | * | ||
9 | * date: Sat Mar 30 14:25:25 GMT 2002 | ||
10 | * | ||
11 | * memory functions | ||
12 | */ | ||
13 | |||
14 | #ifndef _MEMORY_H_ | ||
15 | #define _MEMORY_H_ | ||
16 | |||
17 | #ifdef HAVE_CONFIG_H | ||
18 | #include "config.h" | ||
19 | #endif | ||
20 | |||
21 | |||
22 | #include <stdio.h> | ||
23 | #include <stdlib.h> | ||
24 | #include <string.h> | ||
25 | #include <errno.h> // Johannes E. Schindelin | ||
26 | |||
27 | #include "debug.h" | ||
28 | |||
29 | extern int errno; | ||
30 | |||
31 | void *__ILWS_malloc(size_t); | ||
32 | void *__ILWS_calloc(size_t,size_t); | ||
33 | void *__ILWS_realloc(void *,size_t); | ||
34 | void __ILWS_free(void *); | ||
35 | |||
36 | struct memrequest { | ||
37 | char *ptr; | ||
38 | struct memrequest *next; | ||
39 | }; | ||
40 | struct memrequest *__ILWS_init_buffer_list(); | ||
41 | void *__ILWS_add_buffer(struct memrequest *,unsigned int); | ||
42 | void __ILWS_delete_buffer(struct memrequest *); | ||
43 | void __ILWS_delete_next_buffer(struct memrequest *); | ||
44 | void __ILWS_delete_buffer_list(struct memrequest *); | ||
45 | |||
46 | #endif | ||