Update of /cvsroot/monetdb/MonetDB5/src/mal
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28962/mal

Modified Files:
        mal_recycle.mx 
Log Message:
dump all parameters needed
added HARLIMIT_MEM to protect further against overflow


Index: mal_recycle.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/mal/mal_recycle.mx,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- mal_recycle.mx      11 Mar 2008 23:45:41 -0000      1.35
+++ mal_recycle.mx      12 Mar 2008 07:20:08 -0000      1.36
@@ -68,8 +68,12 @@
 We need some hard limits to not run out of datastructure
 spaces.
 @h
+#define RU 1024 /* recycle unit in bytes */
+#define GIGA (long)(1024*1024*1024)
+
 #define HARDLIMIT_VAR 25000
 #define HARDLIMIT_STMT 4000    /* roughly 5/line needed */
+#define HARDLIMIT_MEM 8 * GIGA/RU      /* avoid memory overflow */
 
 mal_export int recycleVersion;  /* version of recycle table */
 mal_export int retainPolicy;
@@ -82,7 +86,6 @@
 
 mal_export int recycleTime;            
 mal_export int recycleVolume;
-#define RU 1024 /* recycle unit in bytes */
 
 mal_export int reusePolicy;
 #define REUSE_NONE     0
@@ -310,7 +313,8 @@
                recycleCacheLimit < recycleBlk->stop)
                        return -1; /* no more caching */
        if( recycleBlk->vtop >= HARDLIMIT_VAR ||
-               recycleBlk->stop >= HARDLIMIT_STMT)
+               recycleBlk->stop >= HARDLIMIT_STMT ||
+               recycleMemory > HARDLIMIT_MEM)
                        return -1; /* no more caching */
 
 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to