HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_Memory.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: UT_Memory.h ( UT Library, C++)
7  *
8  * COMMENTS: Memory tracking utilities
9  */
10 
11 #ifndef __UT_Memory__
12 #define __UT_Memory__
13 
14 #include "UT_API.h"
15 #include <SYS/SYS_Memory.h>
16 
19 
28 
29  UT_MEM_MAX_ENTRIES // Sentinal
30 };
31 
32 class UT_WorkBuffer;
33 
35 public:
36  SYS_MEMORY_SUBCLASS(static, , theUTMemoryTable)
37 
38  /// Print the memory in a "nice" (well at least standard) format. The
39  /// buffer passed in should be at least 80 characters long.
40  static void printMemory(char *buffer, const char *label,
41  size_t used, size_t peak,
42  int indent=3);
43 
44  /// Print an entire table of memory users. This printer assumes that
45  /// each user's label will fit into a 15 character buffer (for formatting)
46  /// The total memory accounted for is returned.
47  static size_t printMemory(UT_WorkBuffer &buffer,
49  int indent=3,
50  bool sort_by_peak=false);
51 
52 
53 private:
54  static SYS_MemoryTable theUTMemoryTable;
55 };
56 
57 #endif
GLuint GLsizei const GLchar * label
Definition: glcorearb.h:2545
UT_MemoryUser
Definition: UT_Memory.h:17
#define UT_API
Definition: UT_API.h:14
Definition: core.h:760
GLenum GLenum GLsizei void * table
Definition: glad.h:5129
#define SYS_MEMORY_SUBCLASS(STATIC, prefix, table)
Definition: SYS_Memory.h:248