home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.atari.st.tech
- Path: sparky!uunet!math.fu-berlin.de!freia.sax.de!hohmuth
- From: hohmuth@freia.sax.de (Michael Hohmuth)
- Subject: Re: Malloc (Was: Sending objc_draw to a buffer)
- Message-ID: <3CL0TYS@math.fu-berlin.de>
- Sender: news@math.fu-berlin.de (Math Department)
- Reply-To: hohmuth@freia.inf.tu-dresden.de
- Organization: Dept. of Computer Science, TU Dresden, Germany
- References: <2b3de6cf@p15.f202.n281.z2.fidonet> <1993Jan3.035343.15539@netcom.com> <1993Jan4.203951.6091@dcs.warwick.ac.uk> <1993Jan6.224937.10888@netcom.com> <wmtwen.726497985@rw8.urc.tue.nl>
- Date: Fri, 8 Jan 1993 16:49:51 GMT
- Lines: 33
-
- In article <wmtwen.726497985@rw8.urc.tue.nl>, wmtwen@rw8.urc.tue.nl (Erlend Nagel) writes:
-
- > Question:
- > Did I do wrong?
-
- No, you didn't.
-
- Now for the details:
-
- > [...] Now I need
- > stacks of 32K each (just an arbitrary number I chose, so that the
- > blocks would be not too small but would not use up too much memory
- > either). These stacks will be used until so much has been deleted that
- > the last one can be freed or until the text has been closed.
- > At the moment I decided to use Malloc and Mfree, because these are OS
- > primitives and I thought that my programs would at least remain
- > compatible with new OS releases that have different memory allocation.
-
- It's OK to use Malloc() here. You do exactly what was proposed earlier in this
- discussion: You allocate large chunks of memory from the system and manage
- them yourself.
-
- However, malloc() and free() are of course compatible to new OS releases, too,
- because they internally use the OS function Malloc().
-
- > And also it seems to me that using Malloc saves a bit of memory because
- > the malloc function does not have to be linked.
-
- malloc()'s code should not consume too much memory (less 1 K).
-
- Michael
- --
- Internet: hohmuth@freia.inf.tu-dresden.de
-