source:
abuse/trunk/src/imlib/jmalloc.hpp
@
128
Last change on this file since 128 was 57, checked in by , 14 years ago | |
---|---|
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 |
17 | enum {ALLOC_SPACE_STATIC,ALLOC_SPACE_CACHE}; |
18 | extern int alloc_space; |
19 | void *jmalloc(int32_t size, char const *what_for); |
20 | void *jrealloc(void *ptr, int32_t size, char const *what_for); |
21 | void jfree(void *ptr); |
22 | void mem_report(char const *filename); |
23 | void jmalloc_init(int32_t min_size); |
24 | void jmalloc_uninit(); |
25 | int32_t j_allocated(); |
26 | int32_t j_available(); |
27 | extern 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.