home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / os2 / programm / 4351 < prev    next >
Encoding:
Internet Message Format  |  1992-08-20  |  1.5 KB

  1. Xref: sparky comp.os.os2.programmer:4351 comp.lang.c:12591
  2. Path: sparky!uunet!kithrup!stanford.edu!snorkelwacker.mit.edu!bloom-beacon!eru.mt.luth.se!lunic!sunic!mcsun!news.funet.fi!mn87504
  3. From: mn87504@cs.tut.fi (Naatula Mika)
  4. Newsgroups: comp.os.os2.programmer,comp.lang.c
  5. Subject: Re: malloc causes a segmentation violation!?
  6. Message-ID: <1992Aug20.204906.7578@funet.fi>
  7. Date: 20 Aug 92 20:49:06 GMT
  8. References: <1992Aug19.155648.6210@funet.fi> <1992Aug19.171317.9312@bnr.ca> <chuckb.714275722@milton>
  9. Sender: usenet@funet.fi (#Kotilo NEWS system )
  10. Organization: Tampere University of Technology
  11. Lines: 21
  12. Nntp-Posting-Host: kaarne.cs.tut.fi
  13.  
  14. In article <chuckb.714275722@milton> chuckb@milton.u.washington.edu (Chuck Bass) writes:
  15.  
  16. > I am wondering if this is common among people who program in C.
  17. > I haven't been programing in multiple environments (TurboC and
  18. > an SGI workstation only).  I write code that runs on both and
  19. > do *lots* of dynamic memory allocation.  Is this a bad habit,
  20. > terrible habit, good habit?  It seems to me that a general
  21. > program should be able to adjust to the required size
  22. > dynamically.  
  23.  
  24. Usually a program must be able to to change dynamically the required
  25. data size. The idea was NOT to make data allocation static but to make
  26. dynamic allocation safer. That's why you should not call malloc
  27. directly. 
  28.  
  29. -- 
  30.              __   | Mika Naatula            Email: mic@cc.tut.fi
  31. |\ //| ||  //  \  | Lindfrosinkatu 8 A 11          mn87504@cs.tut.fi
  32. | \/ | || ||      | 33720 Tampere, FINLAND
  33. |    | ||  \\__/  | 931-185 993
  34. -- 
  35.