1 #ifndef JSONCPP_BATCHALLOCATOR_H_INCLUDED
2 #define JSONCPP_BATCHALLOCATOR_H_INCLUDED
7 #ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
23 template <
typename AllocatedType, const
unsigned int objectPerAllocation>
26 typedef AllocatedType
Type;
30 assert(
sizeof(AllocatedType) * objectPerAllocation >=
31 sizeof(AllocatedType *));
32 assert(objectsPerPage >= 16);
88 AllocatedType
buffer_[objectPerAllocation];
92 const unsigned int mallocSize =
sizeof(
BatchInfo) -
sizeof(AllocatedType) * objectPerAllocation +
93 sizeof(AllocatedType) * objectPerAllocation * objectsPerPage;
110 #endif // ifndef JSONCPP_DOC_INCLUDE_IMPLEMENTATION
112 #endif // JSONCPP_BATCHALLOCATOR_H_INCLUDED