source: abuse/tags/pd/imlib/include/jmalloc.hpp

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