10 #ifndef UT_MemoryResource_h
11 #define UT_MemoryResource_h
35 virtual const
char *
name() const = 0;
67 exint &freed_amount_in_bytes) = 0;
75 exint &in_use_size_bytes,
76 exint &cached_size_bytes)
78 in_use_size_bytes = 0;
79 cached_size_bytes = 0;
94 const uint8 (&uuid)[16]);
137 exint size_in_bytes);
140 exint totalMemory()
const;
152 {
return myClients; }
168 exint myTotalMemory = -1;
169 bool myAmFreeing =
false;
void setTotalMemory(exint mem_in_bytes)
Set the total amount of memory the resource has.
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
GLuint const GLchar * name
const UT_StringMap< std::pair< UT_MemoryClient *, int > > clients() const
exint freeDeviceMemory();
virtual ~UT_MemoryClient()
Niceness
How willingly a client can free memory for other clients.
virtual bool memoryUse(const UT_MemoryResource *resource, exint &in_use_size_bytes, exint &cached_size_bytes)
Wrapper for a client of a limit memory resource.
RequestSeverity
The urgency of the memory free request.