Update of /cvsroot/monetdb/pathfinder/compiler/mem
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9681/compiler/mem
Modified Files:
mem.c mem_gc.c
Log Message:
to support debugging:
let PF(re)alloc_ report the size they failed to (re)allocate
Index: mem.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/mem/mem.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- mem.c 25 May 2007 10:27:39 -0000 1.21
+++ mem.c 26 Nov 2007 20:41:13 -0000 1.22
@@ -42,6 +42,8 @@
#include "oops.h"
+#include "fmt.h"
+
typedef struct PFmem_allocator {
size_t size;
size_t nr;
@@ -147,8 +149,8 @@
if (mem == 0) {
/* don't use PFoops () here as it tries to allocate even more memory */
- PFlog ("fatal error: insufficient memory in %s (%s), line %d",
- file, func, line);
+ PFlog ("fatal error: insufficient memory (allocating "SZFMT" bytes
failed) in %s (%s), line %d",
+ n, file, func, line);
PFexit(-OOPS_FATAL);
}
@@ -167,8 +169,8 @@
if (mem == 0) {
/* don't use PFoops () here as it tries to allocate even more memory */
- PFlog ("fatal error: insufficient memory in %s (%s), line %d",
- file, func, line);
+ PFlog ("fatal error: insufficient memory (re-allocating "SZFMT" bytes
failed) in %s (%s), line %d",
+ n, file, func, line);
PFexit(-OOPS_FATAL);
}
Index: mem_gc.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/mem/mem_gc.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- mem_gc.c 25 May 2007 10:27:39 -0000 1.3
+++ mem_gc.c 26 Nov 2007 20:41:13 -0000 1.4
@@ -49,6 +49,7 @@
#include "gc.h"
#include "mem.h"
#include "oops.h"
+#include "fmt.h"
void
PFmem_init(void)
@@ -73,8 +74,8 @@
if (mem == 0) {
/* don't use PFoops () here as it tries to allocate even more memory */
- PFlog ("fatal error: insufficient memory in %s (%s), line %d",
- file, func, line);
+ PFlog ("fatal error: insufficient memory (allocating "SZFMT" bytes
failed) in %s (%s), line %d",
+ n, file, func, line);
PFexit(-OOPS_FATAL);
}
@@ -94,8 +95,8 @@
if (mem == 0) {
/* don't use PFoops () here as it tries to allocate even more memory */
- PFlog ("fatal error: insufficient memory in %s (%s), line %d",
- file, func, line);
+ PFlog ("fatal error: insufficient memory (re-allocating "SZFMT" bytes
failed) in %s (%s), line %d",
+ n, file, func, line);
PFexit(-OOPS_FATAL);
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins