home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / amiga / programm / 18353 < prev    next >
Encoding:
Text File  |  1993-01-08  |  2.3 KB  |  57 lines

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