Does SDL use IntializeCriticalSection for Win32?

Microsoft changed the implementation of IntializeCriticalSection in Vista (and Windows Server 2008 and Windows 7), and the new one sets aside extra memory for debugging purposes and leaves it lying around. They call it a feature, but the end result is indistinguishable from a memory leak, and it can grow very large (hundreds of megs or even gigabytes) if you’re doing a lot of threading work. To get around this, you need to use InitializeCriticalSectionEx instead, and pass the flag CRITICAL_SECTION_NO_DEBUG_INFO.

See http://stackoverflow.com/questions/804848/critical-sections-leaking-memory-on-vista-win2008 for the gory details.

Does the Windows implementation of SDL use IntializeCriticalSection for any of its threading objects? If so, it will need to be updated to use the extended API under Vista.

Does the Windows implementation of SDL use IntializeCriticalSection for
any of its threading objects?

We use CreateMutex().

–ryan.