diff options
author | Yotam Barnoy | 2010-12-22 15:33:46 +0000 |
---|---|---|
committer | Yotam Barnoy | 2010-12-22 15:33:46 +0000 |
commit | a79ccfed55b881c30de598b7fadd479860b15adf (patch) | |
tree | 489809dea6193844ac92a2bf7add7af3881b53a4 /backends/plugins/elf/memory-manager.h | |
parent | 0134ffd86ef46da8f9311b284ecdd0c5a9fe0957 (diff) | |
download | scummvm-rg350-a79ccfed55b881c30de598b7fadd479860b15adf.tar.gz scummvm-rg350-a79ccfed55b881c30de598b7fadd479860b15adf.tar.bz2 scummvm-rg350-a79ccfed55b881c30de598b7fadd479860b15adf.zip |
PLUGINS: replace all size_t's with uint32's and add #include <malloc.h> to memory manager
uint32 is all we need since we only handle ELF32 anyway.
svn-id: r55012
Diffstat (limited to 'backends/plugins/elf/memory-manager.h')
-rw-r--r-- | backends/plugins/elf/memory-manager.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/backends/plugins/elf/memory-manager.h b/backends/plugins/elf/memory-manager.h index c190f5f593..7a5f3c25df 100644 --- a/backends/plugins/elf/memory-manager.h +++ b/backends/plugins/elf/memory-manager.h @@ -45,12 +45,12 @@ class ELFMemoryManager : public Common::Singleton<ELFMemoryManager> { public: void trackPlugin(bool value); - void trackAlloc(size_t align, size_t size); + void trackAlloc(uint32 align, uint32 size); void allocateHeap(); - void *pluginAllocate(size_t size); - void *pluginAllocate(size_t align, size_t size); + void *pluginAllocate(uint32 size); + void *pluginAllocate(uint32 align, uint32 size); void pluginDeallocate(void *ptr); private: @@ -59,25 +59,25 @@ private: ELFMemoryManager(); ~ELFMemoryManager(); - void *allocateOnHeap(size_t align, size_t size); + void *allocateOnHeap(uint32 align, uint32 size); void deallocateFromHeap(void *ptr); struct Allocation { byte *start; - size_t size; + uint32 size; byte *end() { return start + size; } - Allocation(byte *a, size_t b) : start(a), size(b) {} + Allocation(byte *a, uint32 b) : start(a), size(b) {} }; // heap void *_heap; - size_t _heapAlign; // alignment of the heap - size_t _heapSize; // size of the heap + uint32 _heapAlign; // alignment of the heap + uint32 _heapSize; // size of the heap // tracking allocations bool _trackAllocs; // whether we are currently tracking - size_t _measuredSize; - size_t _measuredAlign; + uint32 _measuredSize; + uint32 _measuredAlign; // real allocations Common::List<Allocation> _allocList; |