Changes in src/memoryallocator.hpp [f66195:be90f1]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/memoryallocator.hpp
-
Property mode
changed from
100644
to100755
rf66195 rbe90f1 8 8 9 9 using namespace std; 10 11 /*********************************************** includes ***********************************/12 10 13 11 // include config.h … … 28 26 #include "memoryusageobserver.hpp" 29 27 30 /******************* *************************** declarations *******************************/28 /******************* wrappers for memory allocation functions ***********************/ 31 29 32 /** Allocates a memory range using malloc(). 30 /** 31 * Allocates a memory range using malloc(). 33 32 * Prints the provided error message in case of a failure. 34 33 * … … 55 54 template <> char* Malloc<char>(size_t size, const char* output); 56 55 57 /** Allocates a memory range using calloc(). 56 /** 57 * Allocates a memory range using calloc(). 58 58 * Prints the provided error message in case of a failure. 59 59 * … … 77 77 }; 78 78 79 /** Reallocates a memory range using realloc(). If the provided pointer to the old 79 /** 80 * Reallocates a memory range using realloc(). If the provided pointer to the old 80 81 * memory range is NULL, malloc() is called instead. 81 82 * Prints the provided error message in case of a failure (of either malloc() or realloc()). … … 105 106 }; 106 107 107 /** Frees allocated memory range using free(). 108 /** 109 * Frees allocated memory range using free(). 108 110 * 109 111 * \param pointer to the allocated memory range to free; may be NULL, this function is a no-op then 110 * \param *msg optional error message111 112 */ 112 113 template <typename X> void Free(X** buffer, const char *msg = NULL) … … 115 116 return; 116 117 117 MemoryUsageObserver::getInstance()->removeMemory(*buffer );118 MemoryUsageObserver::getInstance()->removeMemory(*buffer, msg); 118 119 free(*buffer); 119 120 *buffer = NULL; -
Property mode
changed from
Note:
See TracChangeset
for help on using the changeset viewer.