/** MEMALLOC declares the allocators for a class to allocate
* memory in the non-snapshotting heap. */
-
#define MEMALLOC \
void * operator new(size_t size) { \
return MYMALLOC(size);\
/** SNAPSHOTALLOC declares the allocators for a class to allocate
* memory in the snapshotting heap. */
-
#define SNAPSHOTALLOC
void *MYMALLOC(size_t size);
+void *MYCALLOC(size_t count, size_t size);
void MYFREE(void *ptr);
void system_free( void * ptr );
void *system_malloc( size_t size );
-/** @brief Provides a non-snapshotting allocators for a STL class.
+/** @brief Provides a non-snapshotting allocator for use in STL classes.
*
* The code was adapted from a code example from the book The C++
* Standard Library - A Tutorial and Reference by Nicolai M. Josuttis,
* This software is provided "as is" without express or implied
* warranty, and with no claim as to its suitability for any purpose.
*/
-
template <class T>
class MyAlloc {
public: