00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __UT_Memory__
00020 #define __UT_Memory__
00021
00022 #include "UT_API.h"
00023 #include <SYS/SYS_Memory.h>
00024
00025 enum UT_MemoryUser {
00026 UT_MEM_DEBUG = 0,
00027
00028 UT_MEM_SYMBOLTABLE,
00029 UT_MEM_ARRAY,
00030 UT_MEM_FMALLOC,
00031 UT_MEM_FMALLOC_PAGE,
00032 UT_MEM_RINGBUFFER,
00033 UT_MEM_TAGLIST,
00034 UT_MEM_SPLINE,
00035
00036 UT_MEM_MAX_ENTRIES
00037 };
00038
00039 class UT_WorkBuffer;
00040
00041 class UT_API UT_Memory {
00042 public:
00043 SYS_MEMORY_SUBCLASS(static, , theUTMemoryTable)
00044
00045
00046
00047 static void printMemory(char *buffer, const char *label,
00048 size_t used, size_t peak,
00049 int indent=3);
00050
00051
00052
00053
00054 static size_t printMemory(UT_WorkBuffer &buffer,
00055 SYS_MemoryTable &table,
00056 int indent=3,
00057 bool sort_by_peak=false);
00058
00059
00060 private:
00061 static SYS_MemoryTable theUTMemoryTable;
00062 };
00063
00064 #endif