Files
@ r11377:1be5174fc55e
Branch filter:
Location: cpp/openttd-patchpack/source/src/core/alloc_func.cpp - annotation
r11377:1be5174fc55e
613 B
text/x-c
(svn r15732) -Fix: enumified constant name style
r8537:706233dcd59f r8537:706233dcd59f r9111:983de9c5a848 r8537:706233dcd59f r8537:706233dcd59f r8537:706233dcd59f r8537:706233dcd59f r8537:706233dcd59f r8537:706233dcd59f r8537:706233dcd59f r8537:706233dcd59f r8984:b9a96c1e0b58 r8537:706233dcd59f r8537:706233dcd59f r8537:706233dcd59f r8537:706233dcd59f r8537:706233dcd59f r8537:706233dcd59f r8537:706233dcd59f r8537:706233dcd59f r8984:b9a96c1e0b58 r8537:706233dcd59f r8537:706233dcd59f r8537:706233dcd59f | /* $Id$ */
/** @file alloc_func.cpp Functions to 'handle' memory allocation errors */
#include "../stdafx.h"
#include "alloc_func.hpp"
/**
* Function to exit with an error message after malloc() or calloc() have failed
* @param size number of bytes we tried to allocate
*/
void NORETURN MallocError(size_t size)
{
error("Out of memory. Cannot allocate %i bytes", size);
}
/**
* Function to exit with an error message after realloc() have failed
* @param size number of bytes we tried to allocate
*/
void NORETURN ReallocError(size_t size)
{
error("Out of memory. Cannot reallocate %i bytes", size);
}
|