"Frees" mapped memory by unmapping it.
More...
Inherits G3D::MemoryManager.
|
virtual void * | alloc (size_t s) override |
| Return a pointer to s bytes of memory that are unused by the rest of the program. More...
|
|
virtual void | free (void *ptr) override |
| Invoke to declare that this memory will no longer be used by the program. More...
|
|
virtual bool | isThreadsafe () const override |
| Returns true if this memory manager is threadsafe (i.e., alloc and free can be called asychronously) More...
|
|
|
template<class T , class ... ArgTypes> |
static shared_ptr< T > | createShared (ArgTypes &&... args) |
| Like std::make_shared, but works for protected constructors. More...
|
|
"Frees" mapped memory by unmapping it.
Useful when passing a mapped PixelTransferBuffer to a NetConnection or other API that can use a memory manager for deallocation.
◆ BufferUnmapper()
◆ alloc()
virtual void* G3D::BufferUnmapper::alloc |
( |
size_t |
s | ) |
|
|
inlineoverridevirtual |
Return a pointer to s bytes of memory that are unused by the rest of the program.
The contents of the memory are undefined
Reimplemented from G3D::MemoryManager.
◆ create() [1/2]
◆ create() [2/2]
◆ createShared()
template<class T , class ... ArgTypes>
static shared_ptr<T> G3D::ReferenceCountedObject::createShared |
( |
ArgTypes &&... |
args | ) |
|
|
inlinestaticprotectedinherited |
Like std::make_shared, but works for protected constructors.
Call as createShared<myclass>.
◆ free()
virtual void G3D::BufferUnmapper::free |
( |
void * |
ptr | ) |
|
|
inlineoverridevirtual |
Invoke to declare that this memory will no longer be used by the program.
The memory manager is not required to actually reuse or release this memory.
Reimplemented from G3D::MemoryManager.
◆ isThreadsafe()
virtual bool G3D::BufferUnmapper::isThreadsafe |
( |
| ) |
const |
|
inlineoverridevirtual |
Returns true if this memory manager is threadsafe (i.e., alloc and free can be called asychronously)
Reimplemented from G3D::MemoryManager.
◆ m_buffer