MorphOS Developer
Posts: 1520 from 2003/2/24
From: Finland
Quote:BSzili wrote:
I tried wipeout with the memory list allocator, and I got the following hits:
Quote:
WIPEOUT HIT
01-Jul-14 09:49:19
FreePooled(0x236d1b80,0xdeadbee7,0) called
Name: "Shell process" CLI: "openjo_sp"
CallerStack[0] 0x24c27d98 at MorphOS:Games/OpenJK/base/jospgameppc.so Hunk 0 Offset 0x00145ac8
WIPEOUT HIT
01-Jul-14 09:49:19
FreePooled(0x236d1b80,0xdeadf005,0) called
Name: "Shell process" CLI: "openjo_sp"
CallerStack[0] 0x24c27d98 at MorphOS:Games/OpenJK/base/jospgameppc.so Hunk 0 Offset 0x00145ac8
That offset belongs to free() in libnix, just as in the other cases.
You must find out what is calling this free()... it is very likely some destructor as you pointed out earlier but we could find out which one (or was it already determined?).
Now I cant remember this out of my head but IIRC if you use "STACKLINES=<number>" parameter you get deeper backtrace. Default is 2 so maybe try something like 5 or 10.
But since you are using shared objects I am starting to wonder if they depend on some constructor code that is not called. When building vanilla C code there are only some very simple constructors to initialize stdio and such. In C++ it is much more complex and with my limited C++ experience I have no clue what kind of constructors are there. I would suppose that some static classes need to be initialized... if objects are loaded dynamically it cant be done automatically because constructors are compiler vendor specific feature.
Is it possible build everything statically in one go? Or would it take too much memory or need deep changes to source code?
1 + 1 = 3 with very large values of 1