🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #2350

WinAllocMem vs. malloc()

#2350
From: Jen Che Huang
Date: Fri, 28 Dec 1990 08:40
14 lines
1145 bytes
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
Technical Details
Message-ID: <1990Dec28.084001.19880@usenet@scion.CS.ORST.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!orstcs!usenet!mist.CS.ORST.EDU!huangj

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!orstcs!usenet!mist.CS.ORST.EDU!huangj
From: huangj@mist.cs.orst.edu (Jen Che Huang)
Newsgroups: comp.os.os2.programmer,comp.os.os2.misc
Subject: WinAllocMem vs. malloc()
Message-ID: <1990Dec28.084001.19880@usenet@scion.CS.ORST.EDU>
Date: 28 Dec 90 08:40:01 GMT
Sender: @usenet@scion.CS.ORST.EDU
Organization: Computer Science Department, Oregon State Univ.
Lines: 14
Originator: huangj@mist.CS.ORST.EDU
Nntp-Posting-Host: mist.cs.orst.edu