NO

Author Topic: which function to allocate memory ?  (Read 3152 times)

MaurizioF

  • Guest
which function to allocate memory ?
« on: June 22, 2010, 03:29:26 PM »
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

  • Guest
Re: which function to allocate memory ?
« Reply #1 on: June 22, 2010, 04:24:12 PM »
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.