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.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re^5: XS: free() outside of the main thread causes crash on Windows