HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
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 "
UT_MemoryTable.h
"
16
17
#include <
SYS/SYS_AtomicInt.h
>
18
#include <
SYS/SYS_Types.h
>
19
#include <cstddef>
20
21
enum
UT_MemoryUserEnum
22
{
23
UT_MEM_DEBUG
= 0,
24
25
UT_MEM_SYMBOLTABLE
,
26
UT_MEM_ARRAY
,
27
UT_MEM_FMALLOC
,
28
UT_MEM_FMALLOC_PAGE
,
29
UT_MEM_RINGBUFFER
,
30
UT_MEM_TAGLIST
,
31
UT_MEM_SPLINE
,
32
UT_MEM_JSON
,
33
34
UT_MEM_MAX_ENTRIES
// Sentinal
35
};
36
37
class
UT_WorkBuffer
;
38
39
class
UT_API
UT_Memory
40
{
41
public
:
42
UT_MEMORY_SUBCLASS
(
static
, , theUTMemoryTable)
43
44
/// Print the memory in a "nice" (well at least standard) format. The
45
/// buffer passed in should be at least 80 characters long.
46
static
void
printMemory(
char
*
buffer
,
const
char
*
label
,
47
size_t
used,
size_t
peak,
48
int
indent=3);
49
50
/// Print an entire table of memory users. This printer assumes that
51
/// each user's label will fit into a 15 character buffer (for formatting)
52
/// The total memory accounted for is returned.
53
static
size_t
printMemory(
UT_WorkBuffer
&buffer,
54
UT_MemoryTable
&
table
,
55
int
indent=3,
56
bool
sort_by_peak=
false
);
57
58
59
private
:
60
static
UT_MemoryTable
theUTMemoryTable;
61
};
62
63
#endif
UT_MEM_MAX_ENTRIES
Definition:
UT_Memory.h:34
label
GLuint GLsizei const GLchar * label
Definition:
glcorearb.h:2545
UT_WorkBuffer
Definition:
UT_WorkBuffer.h:74
UT_MEM_SYMBOLTABLE
Definition:
UT_Memory.h:25
UT_MEM_SPLINE
Definition:
UT_Memory.h:31
UT_API.h
UT_API
#define UT_API
Definition:
UT_API.h:14
UT_MEM_DEBUG
Definition:
UT_Memory.h:23
buffer
GLuint buffer
Definition:
glcorearb.h:660
UT_MemoryTable.h
UT_MemoryTable
Definition:
UT_MemoryTable.h:158
SYS_AtomicInt.h
SYS_Types.h
UT_MEM_TAGLIST
Definition:
UT_Memory.h:30
UT_Memory
Definition:
UT_Memory.h:39
table
GLenum GLenum GLsizei void * table
Definition:
glad.h:5129
UT_MEM_FMALLOC_PAGE
Definition:
UT_Memory.h:28
UT_MEM_FMALLOC
Definition:
UT_Memory.h:27
UT_MEMORY_SUBCLASS
#define UT_MEMORY_SUBCLASS(STATIC, prefix, table)
Definition:
UT_MemoryTable.h:303
UT_MEM_JSON
Definition:
UT_Memory.h:32
UT_MEM_RINGBUFFER
Definition:
UT_Memory.h:29
UT_MEM_ARRAY
Definition:
UT_Memory.h:26
UT_MemoryUserEnum
UT_MemoryUserEnum
Definition:
UT_Memory.h:21
UT
UT_Memory.h
Generated on Wed Aug 5 2026 02:59:23 for HDK by
1.8.6