X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=mymemory.h;h=4c44f5be514c4e8fdd9344f2cee7fb939ca8a3ad;hb=c71b8a4681f671a8236a315ae9ce08a49716c37e;hp=b200ae0160c8c0c8ba39ad31384689271986a384;hpb=3cbae521c9cbc4901a8f503612871f3139547e14;p=c11tester.git diff --git a/mymemory.h b/mymemory.h index b200ae01..4c44f5be 100644 --- a/mymemory.h +++ b/mymemory.h @@ -9,7 +9,6 @@ /** 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);\ @@ -26,16 +25,16 @@ /** 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, @@ -45,7 +44,6 @@ void *system_malloc( size_t size ); * This software is provided "as is" without express or implied * warranty, and with no claim as to its suitability for any purpose. */ - template class MyAlloc { public: