home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / mswindo / programm / misc / 5233 < prev    next >
Encoding:
Text File  |  1993-01-21  |  1.1 KB  |  32 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!sybus.sybus.com!myrddin!tct!jeff
  3. From: jeff@tct.com (Jeff Witzer)
  4. Subject: calloc () vs. LocalAlloc ()...
  5. Message-ID: <2B5EB46D.C41C@tct.com>
  6. Date: Thu, 21 Jan 1993 14:34:20 GMT
  7. Organization: TC Telemanagement, Clearwater, FL
  8. Lines: 22
  9.  
  10. According to Petzold (Programming Windows 3.1 p303) 
  11.  
  12. "The routines in the [Windows] start-up code convert the normal C memory 
  13. allocation functions [calloc, malloc, realloc, and free] into equivalent 
  14. Windows memory allocation functions."
  15.  
  16. This would appear to mean that I can use the standard C calloc () function
  17. if I want.  Correct?
  18.  
  19. I ask because I'm occasionally receiving an Exception 13 on a calloc () in 
  20. my file save functionality and when I'm not (receiving the Exception 13), 
  21. many other normally working functions go haywire after attempting to save.
  22.  
  23. Since the rest of the save functionality seems to be working properly, would
  24. I be wasting my time converting all the calloc ()'s to LocalAllocs ()... or
  25. does Windows really NOT do the appropriate conversion?
  26.  
  27. thanks,
  28.  
  29. jeff@tct.com
  30.  
  31.  
  32.