HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_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: GA_Memory.h ( GA Library, C++)
7  *
8  * COMMENTS: Class to keep track of memory usage
9  */
10 
11 #ifndef __GA_Memory__
12 #define __GA_Memory__
13 
14 #include "GA_API.h"
15 #include <UT/UT_Memory.h>
16 #include <SYS/SYS_Memory.h>
17 
18 /// This enum is used to classify different uses for memory allocation
20 {
21  GA_MEM_DEBUG = 0, // This can be used to track down discrepancies
22 
23  GA_MEM_MISC, // Miscellaneous allocations
24  GA_MEM_ATTRIBUTE, // Memory used by attributes
25  GA_MEM_ATTRIBUTE_DATA, // Attribute data
26  GA_MEM_ATTRIBUTE_FILTER, // Rough memory used by attribute filters
27  GA_MEM_GROUP, // Group memory
28  GA_MEM_INDEX_MAP, // Index map memory usage
29  GA_MEM_PRIMITIVE, // Memory used by primitives
30  GA_MEM_TEMPORARIES, // Temporary storage
31  GA_MEM_BLOBS, // Attribute blobs
32  GA_MEM_EDITDELTA, // Memory allocated to recording edit deltas
33  GA_MEM_GBPOINTREF, // GB point ref
34  GA_MEM_RANGE, // Ranges/RangeTypeInterfaces
35 
36  GA_MAX_MEM_USERS // Sentinal
37 };
38 
39 /// Keeps track of memory used by the GA library
40 /// @see UT_Memory, SYS_Memory
41 /// @see enum::GA_MemUser
42 class GA_API GA_Memory : public UT_Memory
43 {
44 public:
45  SYS_MEMORY_SUBCLASS(static, , theGAMemoryTable)
46 
47 private:
48  static SYS_MemoryTable theGAMemoryTable;
49 };
50 
51 #endif
GA_MemUser
This enum is used to classify different uses for memory allocation.
Definition: GA_Memory.h:19
#define GA_API
Definition: GA_API.h:12
#define SYS_MEMORY_SUBCLASS(STATIC, prefix, table)
Definition: SYS_Memory.h:241