which function to allocate memory ?

Started by MaurizioF, June 22, 2010, 03:29:26 PM

Previous topic - Next topic

MaurizioF

Which function can I use to allocate memory in a Win32 program ?
I tried malloc and calloc, but both gives me an exception (Access Violation)
Should I resort to the windows function GlobalAlloc and such ?
Regards.
Maurizio.

MaurizioF

Sorry, it was my fault
I defined an entry function to reduce program size
 
   void __cdecl WinMainCRTStartup(void)

and this omitted the crt memory management functions.

Regards.
Maurizio.