Re: [CODE] Do I need to Free this?

From: Daniel A. Koepke (dkoepke@circlemud.org)
Date: 02/07/02


On Thu, 7 Feb 2002, Justin Adler wrote:

> >> If you're on a non-NT-based Microsoft OS, the memory may
> >> sit there until you reboot.
>
> oh? wow. ouch. My MUD runs on a redhat 5.2 and development on mandrake 8.1
> I hope i haven't been screwing up the memory of the live server (not mine /
> hosts other muds) too much :(  Thank you once more for this warning.

My quote is a little misleading in this context, so allow me to clarify.
I should have probably said:

  If you're running your Mud on any version of Microsoft Windows 95,
  Windows 98, or Windows ME, the allocated memory may sit there until
  you reboot the computer.

Linux, UNIX (including MacOS X), and Windows NT-based OSes all are much
more sensibly designed.  Memory segmentation prevents processes from
overwriting each others memory and allows the OS more leeway in cleaning
up after processes.

There is an important programming lesson in here: a bad design will be a
bad implementation, no matter what resources you have.  You can be
Microsoft and have a big team of programmers on the OS code, but as long
as they're coding to cracked APIs and a careless design, the end-result
will be bad.  You can be the best programmer that ever lived, and if
you're coding to a bad design, you'll have the worst code you ever wrote.

Unfortunately, the converse isn't true: having a good design while being a
bad programmer makes no guarantees about the quality of implementation.


-dak

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT