Update of /cvsroot/monetdb/MonetDB/src/gdk
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25516

Modified Files:
      Tag: MonetDB_1-20
        gdk_utils.mx 
Log Message:
Backported Niels's memory check fix.

Index: gdk_utils.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_utils.mx,v
retrieving revision 1.192
retrieving revision 1.192.2.1
diff -u -d -r1.192 -r1.192.2.1
--- gdk_utils.mx        5 Sep 2007 17:05:58 -0000       1.192
+++ gdk_utils.mx        16 Oct 2007 10:50:57 -0000      1.192.2.1
@@ -1183,7 +1183,12 @@
        if (size <= GDK_mem_bigsize) {
                size_t newsize = size + 8;
 
+               CHKMEM(newsize, 0);
                blk = realloc(((char *) blk) - 8, newsize);
+               if (blk == NULL && emergency) {
+                       GDKmemfail("GDKrealloc", newsize, BBPTRIM_ALL, 0);
+                       blk = realloc(((char *) blk) - 8, newsize);
+               }
                if (blk != NULL) {
                        /* place 8 bytes before it */
                        assert((((size_t) blk) & 4) == 0);


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to