Files @ r12324:6c583236eedf
Branch filter:

Location: cpp/openttd-patchpack/source/src/core/alloc_func.cpp

translators
(svn r16754) -Update from WebTranslator v3.0:
arabic_egypt - 2 changes by kasakg
traditional_chinese - 64 changes by josesun
german - 4 changes by planetmaker
persian - 2 changes by Gajet9
/* $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 " PRINTF_SIZE " 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 " PRINTF_SIZE " bytes", size);
}