MySQL 5.6.14 Source Code Document
|
#include <NdbQueryOperationImpl.hpp>
Public Member Functions | |
NdbBulkAllocator (size_t objSize) | |
int | init (Uint32 maxObjs) |
void | reset () |
void * | allocObjMem (Uint32 noOfObjs) |
This class simplifies the task of allocating memory for many instances of the same type at once and then constructing them later.
Definition at line 42 of file NdbQueryOperationImpl.hpp.
|
explicit |
[in] | objSize | Size (in bytes) of each object. |
Definition at line 626 of file NdbQueryOperation.cpp.
void * NdbBulkAllocator::allocObjMem | ( | Uint32 | noOfObjs | ) |
Get an area large enough to hold 'noOfObjs' objects.
Definition at line 659 of file NdbQueryOperation.cpp.
int NdbBulkAllocator::init | ( | Uint32 | maxObjs | ) |
Allocate memory for a number of objects from the heap.
[in] | maxObjs | The maximal number of objects this instance should accomodate. |
Definition at line 633 of file NdbQueryOperation.cpp.
void NdbBulkAllocator::reset | ( | void | ) |
Release allocated memory to heap and reset *this to initial state.
Definition at line 647 of file NdbQueryOperation.cpp.