lua-users home
lua-l archive

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


Duck escribió:

The segfaults seem to start at N == TASK_SLOTS_STEP.

With TASK_SLOTS_STEP at 256, it works until N == 255, then segfaults. I set it to 384 and the segfaults start when N == 384. For N at 381, 382, 383 it all work fine.

I tried setting TASK_SLOTS_STEP to 443, and the behaviour was what you might expect: it worked up to 442 tasks and segfaulted from 443 and up.

Hope this helps.


Thanks,

Yes... this helps.

LuaTask allocates TASK_ENTRY memory in TASK_SLOTS_STEP * sizeof(TASK_ENTRY) chunks.
Problem arises when it reallocates memory to grow one step more.

The size of TASK_ENTRY structure is 52 bytes on Linux.
As a workaround, you can set TASK_SLOTS_STEP larger enough in order to avoid reallocation.

It's time to work on 1.6.2 ... :-(

Regards,
Daniel