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