aboutsummaryrefslogtreecommitdiff
path: root/src/memory.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/memory.h')
-rw-r--r--src/memory.h30
1 files changed, 12 insertions, 18 deletions
diff --git a/src/memory.h b/src/memory.h
index 8c759f3d..6e8f72f2 100644
--- a/src/memory.h
+++ b/src/memory.h
@@ -14,33 +14,27 @@
14#ifndef _MEMORY_H_ 14#ifndef _MEMORY_H_
15#define _MEMORY_H_ 15#define _MEMORY_H_
16 16
17#ifdef HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21
22#include <stdio.h> 17#include <stdio.h>
23#include <stdlib.h> 18#include <stdlib.h>
24#include <string.h> 19#include <string.h>
25#include <errno.h> // Johannes E. Schindelin 20#include <errno.h>
26 21
27#include "debug.h" 22#define __ILWS_malloc malloc
23#define __ILWS_calloc calloc
24#define __ILWS_realloc realloc
25#define __ILWS_free free
28 26
29extern int errno; 27struct memrequest;
30 28
31void *__ILWS_malloc(size_t);
32void *__ILWS_calloc(size_t,size_t);
33void *__ILWS_realloc(void *,size_t);
34void __ILWS_free(void *);
35
36struct memrequest {
37 char *ptr;
38 struct memrequest *next;
39};
40struct memrequest *__ILWS_init_buffer_list(); 29struct memrequest *__ILWS_init_buffer_list();
41void *__ILWS_add_buffer(struct memrequest *,unsigned int); 30
31void *__ILWS_add_buffer(struct memrequest *,
32 unsigned int);
33
42void __ILWS_delete_buffer(struct memrequest *); 34void __ILWS_delete_buffer(struct memrequest *);
35
43void __ILWS_delete_next_buffer(struct memrequest *); 36void __ILWS_delete_next_buffer(struct memrequest *);
37
44void __ILWS_delete_buffer_list(struct memrequest *); 38void __ILWS_delete_buffer_list(struct memrequest *);
45 39
46#endif 40#endif