lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I ran some instrumentation and it seems that the program is spending
a lot of time at one line in LoadConstants (lundump.c):

static void LoadConstants(LoadState* S, Proto* f)
{
 int i,n;
 n=LoadInt(S);                                  << n = 50331648
 f->k=luaM_newvector(S->L,n,TValue);            << no problems here
 f->sizek=n;
 for (i=0; i<n; i++) setnilvalue(&f->k[i]);     << takes a while here
 ...

In my old Pentium II with 256Mb of memory running Linux the process is
killed by the OS after a while. Roberto has suggested that it's probably
a paging problem. In newer machines with larger memory the program runs
correctly, aborting with a sensible error message (bad constant).