home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / c / 19393 < prev    next >
Encoding:
Text File  |  1993-01-07  |  1.4 KB  |  37 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!hobbes.physics.uiowa.edu!news.uiowa.edu!eng.uiowa.edu!hari
  3. From: hari@blackmail.eng.uiowa.edu (Hari Vattikota)
  4. Subject: Question on malloc
  5. Message-ID: <1993Jan8.010231.14608@news.uiowa.edu>
  6. Sender: hari@blackmail (Hari Vattikota)
  7. Date: Fri, 8 Jan 1993 01:02:31 GMT
  8. Nntp-Posting-Host: blackmail.eng.uiowa.edu
  9. Organization: Department of Elect. and Comp. Engr., University of Iowa, USA.
  10. Lines: 25
  11.  
  12. Hi,
  13.  
  14.     I have a problem with malloc in my program.
  15.     I have my program split in two files.The first file has the "main"
  16.     routine and several subroutines.One of the subroutines in "main" is
  17.     present in the second file.And when it calls this subroutine from
  18.     the second file it always gives a segmentation fault at the first
  19.     malloc as the malloc returns NULL pointer.Also I do quite some
  20.     memory allocation using malloc in "main" before calling the
  21.     subroutine.Irrespective of the amount of malloc I do before calling
  22.     this subroutine it always crashes at the first malloc in the
  23.     subroutine.I am executing the program on an HP Apollo series 400
  24.     machine and the error message is "Conflicting versions of malloc
  25.     libraries in use" and malloc returns NULL pointer.I've checked the
  26.     pointers.I don't find any type mismatches.
  27.     What might be the cause of the error.Is it malloc or is it something
  28.     else?
  29.  
  30.     If you have any idea please let me know.
  31.     Thanks.
  32.  
  33.     Hari.
  34.  
  35.  
  36.  
  37.