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

Modified Files:
        gdk_utils.mx 
Log Message:
also check available memory on reallocs and if it fails also call BBPtrim.


Index: gdk_utils.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_utils.mx,v
retrieving revision 1.193
retrieving revision 1.194
diff -u -d -r1.193 -r1.194
--- gdk_utils.mx        4 Oct 2007 10:33:45 -0000       1.193
+++ gdk_utils.mx        16 Oct 2007 09:23:45 -0000      1.194
@@ -1185,7 +1185,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