Files
@ r12645:5482768a01c1
Branch filter:
Location: cpp/openttd-patchpack/source/src/core/alloc_func.cpp - annotation
r12645:5482768a01c1
639 B
text/x-c
(svn r17110) -Fix [NoAI]: Print a warning message in the AI console when a deprecated function is used
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 r11870:92eb16f6d311 r8537:706233dcd59f r8537:706233dcd59f r8537:706233dcd59f r8537:706233dcd59f r8537:706233dcd59f r8537:706233dcd59f r8984:b9a96c1e0b58 r8537:706233dcd59f r11870:92eb16f6d311 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 " 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);
}
|