source: abuse/trunk/src/imlib/jmalloc.hpp @ 128

Last change on this file since 128 was 57, checked in by Sam Hocevar, 14 years ago
  • Move each header to the same directory as its corresponding source, to get a better idea of which files are likely to export symbols.
File size: 854 bytes
Line 
1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
4 *
5 *  This software was released into the Public Domain. As with most public
6 *  domain software, no warranty is made or implied by Crack dot Com or
7 *  Jonathan Clark.
8 */
9
10#ifndef __jmalloc_hpp_
11#define __jmalloc_hpp_
12
13
14#include <stdlib.h>
15
16#ifdef MANAGE_MEM
17enum {ALLOC_SPACE_STATIC,ALLOC_SPACE_CACHE};
18extern int alloc_space;
19void *jmalloc(int32_t size, char const *what_for);
20void *jrealloc(void *ptr, int32_t size, char const *what_for);
21void jfree(void *ptr);
22void mem_report(char const *filename);
23void jmalloc_init(int32_t min_size);
24void jmalloc_uninit();
25int32_t j_allocated();
26int32_t 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.