in reply to a tale of the windows runtime libs
The static lib is only available on 32-bit platforms, BTW.
The crash occurs because of memory heaps. Windows was designed to avoid this problem by having a per-process heap that all code can discover. The compiler RTL then circumvents this and creates a new heap instance. Had they used GetProcessHeap instead of CreateHeap (or whatever they are called), it would not have been an issue.
If code allocates memory from one heap and frees it on another, things break.
The solution would be for the main perl interpreter dll to export a malloc/free pair of functions that are to be used by all XS code. Maybe it does and is under appreciated. Maybe that feature is missing? I don't know.
—John
Updated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: a tale of the windows runtime libs
by syphilis (Archbishop) on Jun 05, 2009 at 00:45 UTC | |
by John M. Dlugosz (Monsignor) on Jun 05, 2009 at 14:44 UTC | |
|
Re^2: a tale of the windows runtime libs
by Anonymous Monk on Jun 05, 2009 at 02:23 UTC |