HDK
|
Wrapper for a client of a limit memory resource. More...
#include <UT_MemoryResource.h>
Public Types | |
enum | RequestSeverity { NORMAL_REQUEST, FATAL_REQUEST } |
The urgency of the memory free request. More... | |
enum | Niceness { SCRATCH_FREE, READILY_FREE, NORMAL_FREE, RELUCTANT_FREE, CANNOT_FREE, MAX_NICENESS } |
How willingly a client can free memory for other clients. More... | |
Public Member Functions | |
UT_MemoryClient () | |
virtual | ~UT_MemoryClient () |
virtual const char * | name () const =0 |
Printable English name of the client. More... | |
virtual bool | freeMemoryRequest (const UT_MemoryResource *resource, RequestSeverity severity, Niceness nice_level, exint size_in_bytes, exint &freed_amount_in_bytes)=0 |
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.
Definition at line 26 of file UT_MemoryResource.h.
How willingly a client can free memory for other clients.
Enumerator | |
---|---|
SCRATCH_FREE | |
READILY_FREE | |
NORMAL_FREE | |
RELUCTANT_FREE | |
CANNOT_FREE | |
MAX_NICENESS |
Definition at line 45 of file UT_MemoryResource.h.
The urgency of the memory free request.
Enumerator | |
---|---|
NORMAL_REQUEST | |
FATAL_REQUEST |
Definition at line 38 of file UT_MemoryResource.h.
|
inline |
Definition at line 29 of file UT_MemoryResource.h.
|
inlinevirtual |
Definition at line 30 of file UT_MemoryResource.h.
|
pure virtual |
A 'resource' is requesting 'size_in_bytes' amount of memory be freed. If memory is freed, return true and the amount of memory freed in 'freed_amount_in_bytes' 'severity' - severity passed to UT_MemoryResource::requestMemoryFree() 'nice_level' - the current niceness level being asked to free. This will always match once of the niceness levels the client was registered with.
Implemented in CE_RampCache::MemoryClient.
|
inlinevirtual |
Report the amount of memory this client is using from 'resource' 'in_use' refers to memory that is currently being used, where as 'cached' refers to memory that'd being held either for reuse or scratch buffers. Return true if the size can be meaningully reported.
Reimplemented in CE_RampCache::MemoryClient.
Definition at line 74 of file UT_MemoryResource.h.
|
pure virtual |
Printable English name of the client.
Implemented in CE_RampCache::MemoryClient.