source: abuse/trunk/src/imlib/include/jmalloc.hpp @ 28

Last change on this file since 28 was 17, checked in by Sam Hocevar, 18 years ago
  • absolute shitloads of 64 bit fixes.
File size: 572 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(int32_t size, char *what_for);
11void *jrealloc(void *ptr, int32_t size, char *what_for);
12void jfree(void *ptr);
13void mem_report(char *filename);
14void jmalloc_init(int32_t min_size);
15void jmalloc_uninit();
16int32_t j_allocated();
17int32_t 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.