Re: [Monetdb-developers] MonetDB: Oct2010 - When you have MAL plans with 500k lines of co...
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-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
participants (1)
-
Romulo Goncalves