home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / atari / st / tech / 6549 < prev    next >
Encoding:
Text File  |  1993-01-08  |  1.8 KB  |  46 lines

  1. Newsgroups: comp.sys.atari.st.tech
  2. Path: sparky!uunet!math.fu-berlin.de!freia.sax.de!hohmuth
  3. From: hohmuth@freia.sax.de (Michael Hohmuth)
  4. Subject: Re: Malloc (Was: Sending objc_draw to a buffer)
  5. Message-ID: <3CL0TYS@math.fu-berlin.de>
  6. Sender: news@math.fu-berlin.de (Math Department)
  7. Reply-To: hohmuth@freia.inf.tu-dresden.de
  8. Organization: Dept. of Computer Science, TU Dresden, Germany
  9. 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>
  10. Date: Fri, 8 Jan 1993 16:49:51 GMT
  11. Lines: 33
  12.  
  13. In article <wmtwen.726497985@rw8.urc.tue.nl>, wmtwen@rw8.urc.tue.nl (Erlend Nagel) writes:
  14.  
  15. > Question:
  16. > Did I do wrong?
  17.  
  18. No, you didn't.
  19.  
  20. Now for the details:
  21.  
  22. > [...] Now I need
  23. > stacks of 32K each (just an arbitrary number I chose, so that the
  24. > blocks would be not too small but would not use up too much memory
  25. > either). These stacks will be used until so much has been deleted that
  26. > the last one can be freed or until the text has been closed.
  27. > At the moment I decided to use Malloc and Mfree, because these are OS
  28. > primitives and I thought that my programs would at least remain
  29. > compatible with new OS releases that have different memory allocation.
  30.  
  31. It's OK to use Malloc() here. You do exactly what was proposed earlier in this
  32. discussion: You allocate large chunks of memory from the system and manage
  33. them yourself.
  34.  
  35. However, malloc() and free() are of course compatible to new OS releases, too, 
  36. because they internally use the OS function Malloc().
  37.  
  38. > And also it seems to me that using Malloc saves a bit of memory because
  39. > the malloc function does not have to be linked.
  40.  
  41. malloc()'s code should not consume too much memory (less 1 K).
  42.  
  43. Michael
  44. -- 
  45. Internet: hohmuth@freia.inf.tu-dresden.de
  46.