Medial Code Documentation
Loading...
Searching...
No Matches
Data Structures | Public Member Functions
dmlc::MemoryPool< size, align > Class Template Reference

A memory pool that allocate memory of fixed size and alignment. More...

#include <memory.h>

Public Member Functions

 MemoryPool ()
 constructor
 
void * allocate ()
 allocate a new memory of size
 
void deallocate (void *p)
 deallocate a piece of memory
 

Detailed Description

template<size_t size, size_t align>
class dmlc::MemoryPool< size, align >

A memory pool that allocate memory of fixed size and alignment.

Template Parameters
sizeThe size of each piece.
alignThe alignment requirement of the memory.

Member Function Documentation

◆ deallocate()

template<size_t size, size_t align>
void dmlc::MemoryPool< size, align >::deallocate ( void *  p)
inline

deallocate a piece of memory

Parameters
pThe pointer to the memory to be de-allocated.

The documentation for this class was generated from the following file: