🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.misc
Article #2232

calloc () vs. LocalAlloc ()...

#2232
From: Jeff Witzer
Date: Thu, 21 Jan 1993 14:34
20 lines
1128 bytes
According to Petzold (Programming Windows 3.1 p303) 

"The routines in the [Windows] start-up code convert the normal C memory 
allocation functions [calloc, malloc, realloc, and free] into equivalent 
Windows memory allocation functions."

This would appear to mean that I can use the standard C calloc () function
if I want.  Correct?

I ask because I'm occasionally receiving an Exception 13 on a calloc () in 
my file save functionality and when I'm not (receiving the Exception 13), 
many other normally working functions go haywire after attempting to save.

Since the rest of the save functionality seems to be working properly, would
I be wasting my time converting all the calloc ()'s to LocalAllocs ()... or
does Windows really NOT do the appropriate conversion?

thanks,

jeff@tct.com
Technical Details
Message-ID: <2B5EB46D.C41C@tct.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!sybus.sybus.com!myrddin!tct!jeff

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!sybus.sybus.com!myrddin!tct!jeff
From: jeff@tct.com (Jeff Witzer)
Subject: calloc () vs. LocalAlloc ()...
Message-ID: <2B5EB46D.C41C@tct.com>
Date: Thu, 21 Jan 1993 14:34:20 GMT
Organization: TC Telemanagement, Clearwater, FL
Lines: 22