[SDL] Win32/Linux SDL Differences

Neil Bradley nb at synthcom.com
Fri Jul 12 17:57:00 PDT 2002


> > I've had similar problems, however it's the reverse. The win32 build works
> > perfectly, and Linux/MacOS faults. ;-(
> I'm pretty sure you just did some mistakes with freeing memories.

Nope. I'm trashing memory - I know it. I have memory wrappers for all
allocations, and it has prefix/suffix markers on all allocated blocks in
debug mode. It tells me I've hashed memory, so I know what's happening in
debug mode. ;-)

> Win32 apps tend to ignore errors. So even if you double free a memory
> area, the app keeps running.

I have wrappers on all of my malloc/frees that will null out a pointer
when I free, and assert they are null when I allocate.

> But in Linux, apps don't ignore errors (at least not as much as Win32
> apps), so they crash immediately.

I've seen it both ways. There are many errors our Linux port didn't catch
but Win32 did, and the reverse is also true. They weren't better or worse
- they were just different. It just depends upon how picky the heap
managers are, and by what method RAM was allocated. In my case, it's 100%
mallocs, so the problem is not related to the OS, but rather to the local
heap management linked in with the code itself.

-->Neil

-------------------------------------------------------------------------------
Neil Bradley            What are burger lovers saying
Synthcom Systems, Inc.  about the new BK Back Porch Griller?
ICQ #29402898	        "It tastes like it came off the back porch." - Me





More information about the SDL mailing list