seems ok to me... he does indeed commit before the free.

On Thu, Sep 16, 2010 at 23:26, Niels Nes <niels....@cwi.nl> wrote:

> Changeset: e34c2647febc for MonetDB
> URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e34c2647febc
> Modified Files:
>        MonetDB/src/gdk/gdk_logger.mx
> Branch: Oct2010
> Log Message:
>
> alloca isn't save for large array's
>
>
> diffs (22 lines):
>
> diff -r fb28538232fe -r e34c2647febc MonetDB/src/gdk/gdk_logger.mx
> --- a/MonetDB/src/gdk/gdk_logger.mx     Thu Sep 16 16:27:03 2010 +0200
> +++ b/MonetDB/src/gdk/gdk_logger.mx     Thu Sep 16 23:21:54 2010 +0200
> @@ -1006,9 +1006,7 @@
>  bm_subcommit(BAT *list, BAT *catalog, BAT *extra, int debug)
>  {
>        BUN p, q;
> -       /* using alloca, since the old TMsubcommit interface also uses
> -          alloca */
> -       bat *n = alloca(sizeof(bat) * (2 + BATcount(list) * 2 + (extra ?
> BATcount(extra) : 0)));
> +       bat *n = (bat*)GDKmalloc(sizeof(bat) * (2 + BATcount(list) * 2 +
> (extra ? BATcount(extra) : 0)));
>        int i = 0;
>        BAT *b = list;
>        BATiter bi = bat_iterator(b);
> @@ -1051,6 +1049,7 @@
>        n[i++] = ABS(catalog->batCacheid);
>        BATcommit(catalog);
>        res = TMsubcommit_list(n, i);
> +       GDKfree(n);
>        return res;
>  }
>
> _______________________________________________
> Checkin-list mailing list
> Checkin-list@monetdb.org
> http://mail.monetdb.org/mailman/listinfo/checkin-list
>
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to