MCPcopy Create free account
hub / github.com/Illumina/hap.py / allocateBatch

Method allocateBatch

external/jsoncpp/jsoncpp.cpp:1144–1153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1142 void operator=(const BatchAllocator &);
1143
1144 static BatchInfo *allocateBatch(unsigned int objectsPerPage) {
1145 const unsigned int mallocSize =
1146 sizeof(BatchInfo) - sizeof(AllocatedType) * objectPerAllocation +
1147 sizeof(AllocatedType) * objectPerAllocation * objectsPerPage;
1148 BatchInfo *batch = static_cast<BatchInfo *>(malloc(mallocSize));
1149 batch->next_ = 0;
1150 batch->used_ = batch->buffer_;
1151 batch->end_ = batch->buffer_ + objectsPerPage;
1152 return batch;
1153 }
1154
1155 BatchInfo *batches_;
1156 BatchInfo *currentBatch_;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected