in reply to Re^4: XS: free() outside of the main thread causes crash on Windows
in thread XS: free() outside of the main thread causes crash on Windows
If you look into win32.c/.h and unwind those functions, you'll find that they use a custom (pseudo-C++ style) allocator that uses different pools for different threads. (iThreads, that is.)
But for that to work properly, it needs to be initialised and as you are not instantiating an interpreter in your thread(s), you are not getting that initialisation done.
Basically, by using the perl environment to compile (what is essentially) pure C code, you're just opening yourself to a whole world of hurt. It, the Perl environment, simply isn't designed to be used that way.
|
|---|