Pelles C forum

C language => Windows questions => Topic started by: MaurizioF on June 22, 2010, 03:29:26 PM

Title: which function to allocate memory ?
Post by: MaurizioF 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.
Title: Re: which function to allocate memory ?
Post by: MaurizioF 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.