[quake3-commits] r2206 - trunk/code/qcommon
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Dec 8 17:25:25 EST 2011
Author: ztm
Date: 2011-12-08 17:25:25 -0500 (Thu, 08 Dec 2011)
New Revision: 2206
Modified:
trunk/code/qcommon/common.c
Log:
Show file/line/label in Com_Error messages when run out of memory in debug build.
Modified: trunk/code/qcommon/common.c
===================================================================
--- trunk/code/qcommon/common.c 2011-12-08 22:24:48 UTC (rev 2205)
+++ trunk/code/qcommon/common.c 2011-12-08 22:25:25 UTC (rev 2206)
@@ -966,12 +966,16 @@
do {
if (rover == start) {
+ // scaned all the way around the list
#ifdef ZONE_DEBUG
Z_LogHeap();
+
+ Com_Error(ERR_FATAL, "Z_Malloc: failed on allocation of %i bytes from the %s zone: %s, line: %d (%s)",
+ size, zone == smallzone ? "small" : "main", file, line, label);
+#else
+ Com_Error(ERR_FATAL, "Z_Malloc: failed on allocation of %i bytes from the %s zone",
+ size, zone == smallzone ? "small" : "main");
#endif
- // scaned all the way around the list
- Com_Error( ERR_FATAL, "Z_Malloc: failed on allocation of %i bytes from the %s zone",
- size, zone == smallzone ? "small" : "main");
return NULL;
}
if (rover->tag) {
@@ -1724,8 +1728,11 @@
#ifdef HUNK_DEBUG
Hunk_Log();
Hunk_SmallLog();
+
+ Com_Error(ERR_DROP, "Hunk_Alloc failed on %i: %s, line: %d (%s)", size, file, line, label);
+#else
+ Com_Error(ERR_DROP, "Hunk_Alloc failed on %i", size);
#endif
- Com_Error( ERR_DROP, "Hunk_Alloc failed on %i", size );
}
if ( hunk_permanent == &hunk_low ) {
More information about the quake3-commits
mailing list