~ubuntu-branches/ubuntu/trusty/teeworlds/trusty-updates

« back to all changes in this revision

Viewing changes to bam/src/mem.h

  • Committer: Bazaar Package Importer
  • Author(s): Jack Coulter
  • Date: 2008-04-13 18:48:12 UTC
  • Revision ID: james.westby@ubuntu.com-20080413184812-efc80waq2er6p1bs
Tags: upstream-0.4.2
ImportĀ upstreamĀ versionĀ 0.4.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/********************************
 
2
 because this application will do lots of smaller
 
3
 allocations and never release them, this basic
 
4
 memory allocator is optimized for it and will chunk
 
5
 memory together so it easily can be released at once.
 
6
 when we are done. This also removes allmost all
 
7
 overhead per allocation.
 
8
**********************************/
 
9
 
 
10
struct HEAP *mem_create();
 
11
void mem_destroy(struct HEAP *heap);
 
12
 
 
13
void *mem_allocate(struct HEAP *heap, int size);
 
14
void mem_dumpstats(struct HEAP *heap);
 
15
 
 
16
/* TODO: perhaps some sort of string pooling to reduce memory usage? */