source: abuse/tags/pd/macabuse/imlib/include/jmalloc.hpp @ 49

Last change on this file since 49 was 49, checked in by Sam Hocevar, 11 years ago
  • Imported original public domain release, for future reference.
File size: 713 bytes
Line 
1#ifndef __jmalloc_hpp_
2#define __jmalloc_hpp_
3
4
5#include <stdlib.h>
6
7#ifdef MANAGE_MEM
8
9
10#ifdef MEM_CHECK
11#include <stdlib.h>
12extern void *operator new( size_t size, char *file, unsigned long line);
13#define new new(__FILE__,__LINE__)
14#endif
15
16
17enum {ALLOC_SPACE_STATIC,ALLOC_SPACE_CACHE};
18extern int alloc_space;
19void *jmalloc(long size, char *what_for);
20void *jrealloc(void *ptr, long size, char *what_for);
21void jfree(void *ptr);
22void mem_report(char *filename);
23void jmalloc_init(long min_size);
24void jmalloc_uninit();
25long j_allocated();
26long j_available();
27extern void free_up_memory();
28#else
29#define jmalloc(x,y) malloc(x)
30#define jrealloc(x,y,z) realloc(x,y)
31#define jfree(x) free(x)
32#endif
33
34
35
36
37#endif
38
39
40
41
42
Note: See TracBrowser for help on using the repository browser.