home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sdrc!thor!scjones
- From: scjones@thor.sdrc.com (Larry Jones)
- Newsgroups: comp.sys.sgi
- Subject: Re: why is malloc() core dumping me?
- Message-ID: <2420@sdrc.COM>
- Date: 21 Dec 92 19:47:45 GMT
- References: <1992Dec18.132718.18673@husc3.harvard.edu>
- Sender: news@sdrc.COM
- Distribution: usa
- Lines: 17
-
- In article <1992Dec18.132718.18673@husc3.harvard.edu>, mlevin@husc8.harvard.edu (Michael Levin) writes:
- > I have a C program on an SGI Iris, which is core-dumping
- > ("segmentation fault"). I have localized this problem to a single
- > statement (by means of putting "printf()"s around it - we have no
- > visual debugger). The statement is:
- > p = (char *) malloc(1024);
-
- This indicates that you have corrupted the internal data structures that
- malloc uses to keep track of allocated and freed memory, probably by
- writing past the end of an allocated block. I suggest you find a copy
- of Conor Cahill's debugging malloc library -- it's been posted to one of
- the comp.sources groups -- it's invaluable in tracking down this kind of
- problem.
- ----
- Larry Jones, SDRC, 2000 Eastman Dr., Milford, OH 45150-2789 513-576-2070
- larry.jones@sdrc.com or ...uunet!sdrc!larry.jones
- See if we can sell Mom and Dad into slavery for a star cruiser. -- Calvin
-