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

Last change on this file since 56 was 56, checked in by Sam Hocevar, 14 years ago
  • Add licensing terms to most C / C++ files (Ref #5).
File size: 854 bytes
RevLine 
[56]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
[2]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;
[39]19void *jmalloc(int32_t size, char const *what_for);
20void *jrealloc(void *ptr, int32_t size, char const *what_for);
[2]21void jfree(void *ptr);
[39]22void mem_report(char const *filename);
[17]23void jmalloc_init(int32_t min_size);
[2]24void jmalloc_uninit();
[17]25int32_t j_allocated();
26int32_t j_available();
[2]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.