Last change
on this file since 608 was
49,
checked in by Sam Hocevar, 15 years ago
|
- Imported original public domain release, for future reference.
|
File size:
557 bytes
|
Rev | Line | |
---|
[49] | 1 | #ifndef __jmalloc_hpp_ |
---|
| 2 | #define __jmalloc_hpp_ |
---|
| 3 | |
---|
| 4 | |
---|
| 5 | #include <stdlib.h> |
---|
| 6 | |
---|
| 7 | #ifdef MANAGE_MEM |
---|
| 8 | enum {ALLOC_SPACE_STATIC,ALLOC_SPACE_CACHE}; |
---|
| 9 | extern int alloc_space; |
---|
| 10 | void *jmalloc(long size, char *what_for); |
---|
| 11 | void *jrealloc(void *ptr, long size, char *what_for); |
---|
| 12 | void jfree(void *ptr); |
---|
| 13 | void mem_report(char *filename); |
---|
| 14 | void jmalloc_init(long min_size); |
---|
| 15 | void jmalloc_uninit(); |
---|
| 16 | long j_allocated(); |
---|
| 17 | long j_available(); |
---|
| 18 | extern 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.