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 <
SYS/SYS_Memory.h
>
16
17
enum
UT_MemoryUser
{
18
UT_MEM_DEBUG
= 0,
19
20
UT_MEM_SYMBOLTABLE
,
21
UT_MEM_ARRAY
,
22
UT_MEM_FMALLOC
,
23
UT_MEM_FMALLOC_PAGE
,
24
UT_MEM_RINGBUFFER
,
25
UT_MEM_TAGLIST
,
26
UT_MEM_SPLINE
,
27
UT_MEM_JSON
,
28
29
UT_MEM_MAX_ENTRIES
// Sentinal
30
};
31
32
class
UT_WorkBuffer
;
33
34
class
UT_API
UT_Memory
{
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,
48
SYS_MemoryTable
&
table
,
49
int
indent=3,
50
bool
sort_by_peak=
false
);
51
52
53
private
:
54
static
SYS_MemoryTable
theUTMemoryTable;
55
};
56
57
#endif
UT_MEM_SYMBOLTABLE
Definition:
UT_Memory.h:20
label
GLuint GLsizei const GLchar * label
Definition:
glcorearb.h:2545
UT_MEM_ARRAY
Definition:
UT_Memory.h:21
UT_WorkBuffer
Definition:
UT_WorkBuffer.h:74
SYS_Memory.h
UT_MemoryUser
UT_MemoryUser
Definition:
UT_Memory.h:17
UT_API.h
UT_API
#define UT_API
Definition:
UT_API.h:14
UT_MEM_RINGBUFFER
Definition:
UT_Memory.h:24
UT_MEM_JSON
Definition:
UT_Memory.h:27
buffer
Definition:
core.h:760
UT_MEM_MAX_ENTRIES
Definition:
UT_Memory.h:29
SYS_MemoryTable
Definition:
SYS_Memory.h:105
UT_MEM_TAGLIST
Definition:
UT_Memory.h:25
UT_Memory
Definition:
UT_Memory.h:34
table
GLenum GLenum GLsizei void * table
Definition:
glad.h:5129
SYS_MEMORY_SUBCLASS
#define SYS_MEMORY_SUBCLASS(STATIC, prefix, table)
Definition:
SYS_Memory.h:248
UT_MEM_FMALLOC
Definition:
UT_Memory.h:22
UT_MEM_FMALLOC_PAGE
Definition:
UT_Memory.h:23
UT_MEM_SPLINE
Definition:
UT_Memory.h:26
UT_MEM_DEBUG
Definition:
UT_Memory.h:18
UT
UT_Memory.h
Generated on Mon Oct 14 2024 02:50:36 for HDK by
1.8.6