home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!usc!rpi!gatech!concert!sas!mozart.unx.sas.com!walker
- From: walker@twix.unx.sas.com (Doug Walker)
- Subject: Re: Programming is getting painful!
- Originator: walker@twix.unx.sas.com
- Sender: news@unx.sas.com (Noter of Newsworthy Events)
- Message-ID: <C0JIKp.I6D@unx.sas.com>
- Date: Fri, 8 Jan 1993 14:50:49 GMT
- References: <C0IwoG.7ow@usenet.ucs.indiana.edu>
- Nntp-Posting-Host: twix.unx.sas.com
- Organization: SAS Institute Inc.
- Lines: 43
-
-
- In article <C0IwoG.7ow@usenet.ucs.indiana.edu>, shulick@navajo.ucs.indiana.edu (Sam Hulick) writes:
- |>
- |> *ARH*!!! It seems I can't program a thing without memory leaks. I
- |> wrote a little simple server, and I run the server, then shut it down
- |> immediately, and sure enough.. about 8k bytes are not freed. HOW does
- |> one trace these memory leaks? And please don't say MungWall or
- |> Enforcer. I really don't understand one bit of their output. ANy help
- |> would be REALLY appreciated. Thanks.
-
- |> // Amiga 3000 ___ \ Sam Hulick: shulick@indiana.edu (NeXTmail OK!)
-
- Get a copy of my memlib stuff. It should be available on various
- PD archives, including Fish Disk #240. An updated version also
- comes with SAS/C 6.0 in the SC:EXTRAS/MEMLIB drawer.
-
- Memlib is designed to catch the following kinds of memory problems:
-
- *) Not freeing memory
- *) Freeing memory twice
- *) Freeing an incorrect length
- *) Overwriting the beginning or end of a block
- *) Relying on the value of freed memory
- *) Writing to freed memory
-
- If/when it detects an error, it will tell you the filename and line
- number of the location that allocated and/or freed the memory.
-
- As for enforcer/mungwall output, LEARN HOW TO USE IT. Enforcer in
- particular is a critically important tool. If you're using SAS/C
- Version 6.x, the CPR debugger will automatically use enforcer to
- stop your program at the location that is causing the enforcer hit;
- this is probably the easiest way to use it.
-
- --
- *****
- =*|_o_o|\\=====Doug Walker, Software Distiller====== BBS: (919)460-7430 =
- *|. o.| || 1200/2400/9600 Dual
- | o |// For all you do, this bug's for you!
- ======
- usenet: walker@unx.sas.com bix: djwalker
- Any opinions expressed are mine, not those of SAS Institute, Inc.
-
-