home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / aix / 8120 < prev    next >
Encoding:
Text File  |  1992-07-23  |  1.5 KB  |  41 lines

  1. Newsgroups: comp.unix.aix
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!void.ncsa.uiuc.edu!marca
  3. From: marca@void.ncsa.uiuc.edu (Marc Andreessen)
  4. Subject: Re: SUMMARY: dbx problems
  5. References: <1992Jul23.202224.29736@ief.itg.ti.com>
  6. Message-ID: <BrvAFJ.6oM@news.cso.uiuc.edu>
  7. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  8. Organization: University of Illinois at Urbana
  9. Date: Fri, 24 Jul 1992 00:23:41 GMT
  10. Lines: 29
  11.  
  12. block@ief.itg.ti.com (Bucky Block) writes:
  13. : Thanks to Gary Keim <gk5g+@andrew.cmu.edu> who provided me
  14. : with the MALLOCTYPE 3.1 fix. After I set that variable dbx
  15. : worked ok (not great, but ok). 
  16. : Funny thing, my application dies if I don't use the 3.1 malloc, 
  17. : does anyone know what the difference is between the two mallocs?
  18.  
  19. Your application is mishandling memory.  The 3.2 malloc is much more 
  20. stringent about allocating the proper amount of memory, while the 3.1 
  21. malloc would round your request up to the next power of two (in bytes, 
  22. I believe).  Also, 3.1 malloc would clear all memory it allocated to 0; 
  23. 3.2 malloc does not.  (Normally, malloc isn't supposed to do this -
  24. but calloc is.)
  25.  
  26. Because so many applications use memory incorrectly but work with the
  27. overly liberal 3.1 malloc, IBM decided to continue to supply it with 3.2;
  28. thus, the MALLOCTYPE variable.
  29.  
  30. Hope this helps,
  31.  
  32. Marc
  33.  
  34. -- 
  35. Marc Andreessen
  36. Software Development Group
  37. National Center for Supercomputing Applications
  38. marca@ncsa.uiuc.edu
  39.