On 05/09/2007 01:58 PM, Peter Boncz wrote:
> Update of /cvsroot/monetdb/MonetDB/src/gdk
> In directory sc8-pr-cvs16:/tmp/cvs-serv2304
>
> Modified Files:
> gdk_utils.mx
> Log Message:
> bug with terabyte memory usage was introduced in 1.172 (sjoerd)
> - GDKmallocmax(size, *maxsize) =>
> this routine is also used for realloc and maxsize is an input parameter,
> so must be initialized.
Did you look at the *reason* for that change? I think not. The reason
was that the size value afterwards was wrong for the call to memset.
Now you have reintroduced that bug.
What you *should* have done was to initialize maxsize with size.
>
> Index: gdk_utils.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_utils.mx,v
> retrieving revision 1.181
> retrieving revision 1.182
> diff -u -d -r1.181 -r1.182
> --- gdk_utils.mx 2 May 2007 16:17:04 -0000 1.181
> +++ gdk_utils.mx 9 May 2007 11:58:06 -0000 1.182
> @@ -1070,11 +1070,8 @@
> void *
> GDKzalloc(size_t size)
> {
> - size_t maxsize;
> - void *p = GDKmallocmax(size, &maxsize, 1);
> -
> - if (p)
> - memset(p, 0, size);
> + void *p = GDKmallocmax(size, &size, 1);
> + if (p) memset(p, 0, size);
> return p;
> }
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Monetdb-checkins mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/monetdb-checkins
--
Sjoerd Mullender
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-developers