MAMEWorld >> EmuChat
View all threads Index   Flat Mode Flat  

drewcifer
One bad Mutha-(shut yo' mouth!)
Reged: 07/01/04
Posts: 428
Loc: Sweden
Send PM
Re: mach3 untracked memory
08/12/13 07:15 AM


> I'm probably just talking to myself here, but anyway...
> mingw with -O3 assigns the new operator to malloc().
> mingw with -O0 assigns the new operator to the overloaded version that calls
> malloc_file_line().
> This happens when using the makefile to build, even when chd.c is the only thing
> being explicitly compiled.
>
> Can someone explain to me why it happens?
>
> This is the cause of the untracked memory bug.
> When the new operator calls the malloc_file_line(), the problem goes away.

You're talking to at least me, but man, I've got nothing. That sounds like some weird behavior for sure. You can imagine a compiler thinking it's being smart by throwing away "redundant" code or something with a higher optimization level, but clearly smart isn't the proper word here...

Andrew







Entire thread
Subject Posted by Posted on
* mach3 untracked memory peter ferrie 08/09/13 08:24 AM
. * Re: mach3 untracked memory peter ferrie  08/11/13 08:18 PM
. * Re: mach3 untracked memory drewcifer  08/12/13 07:15 AM

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 332 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 1374