Sign in to follow this  
  • entries
  • comments
  • views


Sign in to follow this  
Evil Steve


Yay, memory manager stuff sorted [smile]:

// Ensure the memory manager is constructed extremely early on
#pragma warning(disable:4074) // warning C4074: initializers put in compiler reserved initialization area
#pragma init_seg(compiler)
struct MemoryInitialiser
MemoryInitialiser() { PMemory::Create(); }
~MemoryInitialiser() { PMemory::Destroy(); }
} g_theMemoryInitialiser;

Hoorah for #pragma init_seg! Incidently, the STL global appears to be in the lib segment, because putting that struct into the lib segment still showed the memory "leaks".

In other news:
Sign in to follow this  

1 Comment

Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now