lua-users home
lua-l archive

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


On 4/30/2012 1:22 AM, Peng Zhicheng wrote:
于 2012-4-29 22:59, Shmuel Zeigerman 写道:
On 29/04/2012 08:04, Peng Zhicheng wrote:
[snip snip]

I did some further experiments. I set a break point at `TlsAlloc',
and my debugger stopped just a few times there, but all before the
EntryPoint of lua.exe is reached.
which means all are called by the system loader before even the
program is completely loaded.

And then after the program started running from its entry point,
the function TlsAlloc was never called again.
and finally the program exit normally. that means, the program did
not allocate any TLS slots at all!
so there couldn't be such problem as `not freed TLS index'. so I
suppose this might be a OS specific problem.

I think there is a hint in mingw-runtime (I'm looking at mingw-runtime-3.7). See the mthr* files. Some TLS memory is allocated for C++ EH, and if it's not cleaned up, they may leak.

Beyond that, I'm totally clueless about the technical details.

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia