home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.aix
- 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
- From: marca@void.ncsa.uiuc.edu (Marc Andreessen)
- Subject: Re: SUMMARY: dbx problems
- References: <1992Jul23.202224.29736@ief.itg.ti.com>
- Message-ID: <BrvAFJ.6oM@news.cso.uiuc.edu>
- Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
- Organization: University of Illinois at Urbana
- Date: Fri, 24 Jul 1992 00:23:41 GMT
- Lines: 29
-
- block@ief.itg.ti.com (Bucky Block) writes:
- :
- : Thanks to Gary Keim <gk5g+@andrew.cmu.edu> who provided me
- : with the MALLOCTYPE 3.1 fix. After I set that variable dbx
- : worked ok (not great, but ok).
- :
- : Funny thing, my application dies if I don't use the 3.1 malloc,
- : does anyone know what the difference is between the two mallocs?
-
- Your application is mishandling memory. The 3.2 malloc is much more
- stringent about allocating the proper amount of memory, while the 3.1
- malloc would round your request up to the next power of two (in bytes,
- I believe). Also, 3.1 malloc would clear all memory it allocated to 0;
- 3.2 malloc does not. (Normally, malloc isn't supposed to do this -
- but calloc is.)
-
- Because so many applications use memory incorrectly but work with the
- overly liberal 3.1 malloc, IBM decided to continue to supply it with 3.2;
- thus, the MALLOCTYPE variable.
-
- Hope this helps,
-
- Marc
-
- --
- Marc Andreessen
- Software Development Group
- National Center for Supercomputing Applications
- marca@ncsa.uiuc.edu
-