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