[comp.os.os2.misc] WinAllocMem vs. malloc

huangj@mist.cs.orst.edu (Jen Che Huang) (12/28/90)

I was wondering what the difference is between WinAllocMem and malloc,
besides that WinAllocMem returns an offset to the heap and malloc returns
a pointer to the heap.  My problem is, I'm using malloc to allocate memory
in my PM App and when I switch between various application and then return
to my application, I get a protection violation when my application tries 
to create a message box.  I was wondering if it would be better to use
WinAllocMem to allocate memory.  

My next step would be to allocate my  own segment, but that would mean
going through my code and changing my allocation scheme.

Thanks.
Jim Huang