lua-users home
lua-l archive

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


Hi,

Adrian Sietsma wrote:
> I applied your patch, which (obviously) didn't solve the max creation 
> problem, but both STACKSIZE 64000 in .def and /STACK:64000 in ldflags fix 
> the problem.
> (at least up to 20,000 threads)

Never use an exact multiple of 64K for lots of similar memory
allocations. Use 60K (61440) or 68K (69632) to avoid D-cache
aliasing conflicts.

Also be careful when calling arbitrary C functions. Some
carelessly written DLLs need a lot more stack space (COM services
in particular).

> It appears that the stack setting must be applied to the .exe, not the .dll 
> - is that correct ?

Yes.

Bye,
     Mike