Mercurial > mm7
comparison Allocator.h @ 0:9c0607679772
init
author | Ritor1 |
---|---|
date | Sat, 12 Jan 2013 09:45:18 +0600 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:9c0607679772 |
---|---|
1 #pragma once | |
2 | |
3 | |
4 #pragma pack(push, 1) | |
5 struct Allocator | |
6 { | |
7 static Allocator *Create() {static Allocator a; return &a;} | |
8 | |
9 Allocator(); | |
10 bool Initialize(unsigned int uNumKBytes); | |
11 void *AllocNamedChunk(const void *pPrevPtrValue, unsigned int uSize, const char *pName); | |
12 void FreeChunk(void *ptr); | |
13 bool CreateFileDump(const char *a1); | |
14 | |
15 void *pMemoryBuffers[6000]; | |
16 unsigned int uMemoryBuffersSizes[6000]; | |
17 char pMemoryBuffersNames[6000][12]; | |
18 unsigned int uDumpsCount; | |
19 unsigned int uNumBuffersUsed; | |
20 void *pBigMemoryBuffer; | |
21 unsigned int uNextFreeOffsetInBigBuffer; | |
22 unsigned int uBigBufferSizeAligned; | |
23 unsigned int bBigBufferAllocated; | |
24 unsigned int bUseBigBuffer; | |
25 void *pBigBufferAligned; | |
26 }; | |
27 #pragma pack(pop) | |
28 | |
29 | |
30 | |
31 extern Allocator *pAllocator; // idb |