src/core/alloc_func.cpp
branchnoai
changeset 10249 58810805030e
parent 9732 f8eb3e208514
child 10429 1b99254f9607
equal deleted inserted replaced
10216:794533ba4cbf 10249:58810805030e
     7 
     7 
     8 /**
     8 /**
     9  * Function to exit with an error message after malloc() or calloc() have failed
     9  * Function to exit with an error message after malloc() or calloc() have failed
    10  * @param size number of bytes we tried to allocate
    10  * @param size number of bytes we tried to allocate
    11  */
    11  */
    12 void MallocError(size_t size)
    12 void NORETURN MallocError(size_t size)
    13 {
    13 {
    14 	error("Out of memory. Cannot allocate %i bytes", size);
    14 	error("Out of memory. Cannot allocate %i bytes", size);
    15 }
    15 }
    16 
    16 
    17 /**
    17 /**
    18  * Function to exit with an error message after realloc() have failed
    18  * Function to exit with an error message after realloc() have failed
    19  * @param size number of bytes we tried to allocate
    19  * @param size number of bytes we tried to allocate
    20  */
    20  */
    21 void ReallocError(size_t size)
    21 void NORETURN ReallocError(size_t size)
    22 {
    22 {
    23 	error("Out of memory. Cannot reallocate %i bytes", size);
    23 	error("Out of memory. Cannot reallocate %i bytes", size);
    24 }
    24 }