home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dove!dove.nist.gov!przemek
- From: przemek@rrdstrad.nist.gov (Przemek Klosowski)
- Newsgroups: comp.unix.ultrix
- Subject: Re: malloc
- Message-ID: <PRZEMEK.92Aug21131005@rrdstrad.nist.gov>
- Date: 21 Aug 92 17:10:05 GMT
- References: <1992Aug20.153542.1417@bmw.mayo.edu> <1992Aug21.021610.11129@decuac.dec.com>
- Sender: news@dove.nist.gov
- Organization: U. of Maryland/NIST
- Lines: 27
- In-reply-to: mjr@hussar.dco.dec.com's message of 21 Aug 92 02:16:10 GMT
-
- In article <1992Aug21.021610.11129@decuac.dec.com> mjr@hussar.dco.dec.com (Marcus J. Ranum) writes:
- staniszewski@mayo.edu writes:
-
- >I am having trouble finding a problem with dynamicly allocated memory.
-
- You could try using the mprof code from (as usual) decuac.dec.com,
- in /pub/sources/mprof-3.0.tar.Z
-
- Alternative malloc debugging library can be had from comp.sources.reviewed
- (malloclib). Its claim to fame is that it containts private versions of
- string and block move routines, so it will complain when you do
-
- strcpy(malloc(strlen(string1)),string1)
- instead of
- strcpy(malloc(strlen(string1)+1),string1)
- (incidentally, it will handle the malloc failure as well)
-
- I found it useful.
-
-
- --
- przemek klosowski (przemek@rrdstrad.nist.gov)
- Reactor Division (bldg. 235), E111
- National Institute of Standards and Technology
- Gaithersburg, MD 20899, USA
-
- (301) 975 6249
-