dragon.globalservices.pool
Global Services API for the Managed Memory Pools and Allocations primary resource component.
The current API only manages memory pools, future versions will also contain methods to track allocations.
Functions
|
Asks Global Services to create a new memory pool |
|
Asks Global Services to destroy a specified pool. |
|
Asks Global Services for a list of the m_uids of all memory pools. |
|
Asks Global Services for the PoolDescriptor of a specified memory pool |
Exceptions
- exception PoolError
- create(size, user_name='', options=None, soft=False)
Asks Global Services to create a new memory pool
- Parameters
size – size of memory pool to create
user_name – Requested user specified reference name
options – PoolOptions object, what options to apply to creation
soft – If pool already exists with given name, do not create and return descriptor instead.
- Returns
PoolDescriptor object
- get_list()
Asks Global Services for a list of the m_uids of all memory pools.
TODO: add some options to this, and to the message itself, to have a finer control over which pools you get back. Deferring until we have a use case
- Returns
list of the m_uids of all currently existing memory pools
- query(identifier)
Asks Global Services for the PoolDescriptor of a specified memory pool
Note you can only query currently existing pools.
- Parameters
identifier – string indicating pool name or integer indicating a m_uid
- Returns
PoolDescriptor object corresponding to specified pool
- Raises
PoolError if there is no such pool
- destroy(identifier)
Asks Global Services to destroy a specified pool.
TODO: figure out the semantics on this. Do we want to throw an error from GS if there are any channels in that pool currently?
- Parameters
identifier – string indicating pool name or integer indicating a m_uid
- Returns
Nothing if successful
- Raises
PoolError if there is no such pool