1 /* 2 * Copyright 2007, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * All rights reserved. Distributed under the terms of the MIT license. 4 */ 5 #ifndef ALLOCATION_INFO_H 6 #define ALLOCATION_INFO_H 7 8 #include <SupportDefs.h> 9 10 class AllocationInfo { 11 public: 12 AllocationInfo(); 13 ~AllocationInfo(); 14 15 void AddNodeTableAllocation(size_t arraySize, size_t vectorSize, 16 size_t elementSize, size_t elementCount); 17 void AddDirectoryEntryTableAllocation(size_t arraySize, size_t vectorSize, 18 size_t elementSize, 19 size_t elementCount); 20 21 void AddAttributeAllocation(size_t size); 22 void AddDirectoryAllocation(); 23 void AddEntryAllocation(); 24 void AddFileAllocation(size_t size); 25 void AddSymLinkAllocation(size_t size); 26 27 void AddAreaAllocation(size_t size, size_t count = 1); 28 void AddBlockAllocation(size_t size); 29 void AddListAllocation(size_t capacity, size_t elementSize); 30 void AddOtherAllocation(size_t size, size_t count = 1); 31 void AddStringAllocation(size_t size); 32 33 void Dump() const; 34 35 private: 36 size_t fNodeTableArraySize; 37 size_t fNodeTableVectorSize; 38 size_t fNodeTableElementCount; 39 size_t fDirectoryEntryTableArraySize; 40 size_t fDirectoryEntryTableVectorSize; 41 size_t fDirectoryEntryTableElementCount; 42 43 size_t fAttributeCount; 44 size_t fAttributeSize; 45 size_t fDirectoryCount; 46 size_t fEntryCount; 47 size_t fFileCount; 48 size_t fFileSize; 49 size_t fSymLinkCount; 50 size_t fSymLinkSize; 51 52 size_t fAreaCount; 53 size_t fAreaSize; 54 size_t fBlockCount; 55 size_t fBlockSize; 56 size_t fListCount; 57 size_t fListSize; 58 size_t fOtherCount; 59 size_t fOtherSize; 60 size_t fStringCount; 61 size_t fStringSize; 62 }; 63 64 #endif // ALLOCATION_INFO_H 65