home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!hobbes.physics.uiowa.edu!news.uiowa.edu!eng.uiowa.edu!hari
- From: hari@blackmail.eng.uiowa.edu (Hari Vattikota)
- Subject: Question on malloc
- Message-ID: <1993Jan8.010231.14608@news.uiowa.edu>
- Sender: hari@blackmail (Hari Vattikota)
- Date: Fri, 8 Jan 1993 01:02:31 GMT
- Nntp-Posting-Host: blackmail.eng.uiowa.edu
- Organization: Department of Elect. and Comp. Engr., University of Iowa, USA.
- Lines: 25
-
- Hi,
-
- I have a problem with malloc in my program.
- I have my program split in two files.The first file has the "main"
- routine and several subroutines.One of the subroutines in "main" is
- present in the second file.And when it calls this subroutine from
- the second file it always gives a segmentation fault at the first
- malloc as the malloc returns NULL pointer.Also I do quite some
- memory allocation using malloc in "main" before calling the
- subroutine.Irrespective of the amount of malloc I do before calling
- this subroutine it always crashes at the first malloc in the
- subroutine.I am executing the program on an HP Apollo series 400
- machine and the error message is "Conflicting versions of malloc
- libraries in use" and malloc returns NULL pointer.I've checked the
- pointers.I don't find any type mismatches.
- What might be the cause of the error.Is it malloc or is it something
- else?
-
- If you have any idea please let me know.
- Thanks.
-
- Hari.
-
-
-
-