Hello, I fixed the alloca problem, but I am wondering if the newStack function is correct.
On 15/09/10 15:56, Romulo Goncalves wrote: > Changeset: 2727702e548b for MonetDB > URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2727702e548b > Modified Files: > MonetDB5/src/mal/mal_interpreter.mx > MonetDB5/src/mal/mal_stack.mx > Branch: Oct2010 > Log Message: > > When you have MAL plans with 500k lines of code mserver crashes at the memset > after newStack. > This function is only called in one place and followed by a memset. > Therefore, the alloca + memset > can be replaced by a zalloc. > > The structure is free in the end of the function call before the return. > > > diffs (32 lines): > ... > #define stackSize(CNT) (sizeof(ValRecord)*(CNT) + sizeof(MalStack)) > -#define newStack(S,CNT) S= (MalStkPtr) alloca(stackSize(CNT));\ > +#define newStack(S,CNT) S= (MalStkPtr) GDKzalloc(stackSize(CNT));\ > (S)->stksize=CNT; I do not know the context, but shouldn't the stack size be stackSize(CNT) instead of CNT? Romulo > > > _______________________________________________ > Checkin-list mailing list > checkin-l...@monetdb.org > http://mail.monetdb.org/mailman/listinfo/checkin-list ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Monetdb-developers mailing list Monetdb-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-developers