From: Brian Demsky Date: Wed, 6 Jun 2012 09:01:38 +0000 (-0700) Subject: more doc changes X-Git-Tag: pldi2013~391^2~43 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=model-checker.git;a=commitdiff_plain;h=3cbae521c9cbc4901a8f503612871f3139547e14 more doc changes --- diff --git a/mymemory.h b/mymemory.h index c159e53..b200ae0 100644 --- a/mymemory.h +++ b/mymemory.h @@ -7,6 +7,9 @@ #include #include +/** 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);\ @@ -21,7 +24,9 @@ MYFREE(p);\ } -/* Empty define; represents opposite of MEMALLOC */ +/** SNAPSHOTALLOC declares the allocators for a class to allocate + * memory in the snapshotting heap. */ + #define SNAPSHOTALLOC void *MYMALLOC(size_t size); @@ -29,16 +34,18 @@ void MYFREE(void *ptr); void system_free( void * ptr ); void *system_malloc( size_t size ); -/* -The following code example is taken from the book -The C++ Standard Library - A Tutorial and Reference -by Nicolai M. Josuttis, Addison-Wesley, 1999 -© Copyright Nicolai M. Josuttis 1999 -Permission to copy, use, modify, sell and distribute this software -is granted provided this copyright notice appears in all copies. -This software is provided "as is" without express or implied -warranty, and with no claim as to its suitability for any purpose. -*/ + +/** @brief Provides a non-snapshotting allocators for a STL class. + * + * The code was adapted from a code example from the book The C++ + * Standard Library - A Tutorial and Reference by Nicolai M. Josuttis, + * Addison-Wesley, 1999 © Copyright Nicolai M. Josuttis 1999 + * Permission to copy, use, modify, sell and distribute this software + * is granted provided this copyright notice appears in all copies. + * 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: @@ -107,12 +114,14 @@ template } }; -// return that all specializations of this allocator are interchangeable +/** Return that all specializations of this allocator are interchangeable. */ template bool operator== (const MyAlloc&, const MyAlloc&) throw() { return true; } + +/** Return that all specializations of this allocator are interchangeable. */ template bool operator!= (const MyAlloc&, const MyAlloc&) throw() {