Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/memoryallocator.hpp

    • Property mode changed from 100755 to 100644
    rbe90f1 rf66195  
    88
    99using namespace std;
     10
     11/*********************************************** includes ***********************************/
    1012
    1113// include config.h
     
    2628#include "memoryusageobserver.hpp"
    2729
    28 /******************* wrappers for memory allocation functions ***********************/
     30/********************************************** declarations *******************************/
    2931
    30 /**
    31  * Allocates a memory range using malloc().
     32/** Allocates a memory range using malloc().
    3233 * Prints the provided error message in case of a failure.
    3334 *
     
    5455template <> char* Malloc<char>(size_t size, const char* output);
    5556
    56 /**
    57  * Allocates a memory range using calloc().
     57/** Allocates a memory range using calloc().
    5858 * Prints the provided error message in case of a failure.
    5959 *
     
    7777};
    7878
    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
    8180 * memory range is NULL, malloc() is called instead.
    8281 * Prints the provided error message in case of a failure (of either malloc() or realloc()).
     
    106105};
    107106
    108 /**
    109  * Frees allocated memory range using free().
     107/** Frees allocated memory range using free().
    110108 *
    111109 * \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
    112111 */
    113112template <typename X> void Free(X** buffer, const char *msg = NULL)
     
    116115    return;
    117116
    118   MemoryUsageObserver::getInstance()->removeMemory(*buffer, msg);
     117  MemoryUsageObserver::getInstance()->removeMemory(*buffer);
    119118  free(*buffer);
    120119  *buffer = NULL;
Note: See TracChangeset for help on using the changeset viewer.