Author: KarinsDad
Date: 21:32:18 12/27/98
Go up one level in this thread
On December 27, 1998 at 21:53:34, Robert Hyatt wrote: >On December 26, 1998 at 23:58:26, Komputer Korner wrote: > >>On December 24, 1998 at 09:42:11, KarinsDad wrote: >> >>>On December 24, 1998 at 03:22:36, Komputer Korner wrote: >>>>in WIN 95 without CB7 running I had 93% system resources free. After running CB >>>>7 it went down to 76%. After closing CB 7 it went back to only 89%, so a clear >>>>memory leak. >>>>-- >>>>Komputer Korner >>> >>>KK, >>> >>>That is one of my pet peeve's. It takes a day or two (no big deal) to clean up >>>code so that it doesn't have memory leaks. A memory leak is a bug like any other >>>bug, it just happens to affect your overall system as opposed to the product >>>itself. >>> >>>Do you happen to have any statistics on which chess programs, databases, >>>training tools, etc. have or do not have memory leaks? >>> >>>It would be good for everyone to know this. Especially for those people running >>>chess programs in tournaments or across the net (e.g. I went looking into CB7 >>>for something just before the tournament, forgot to reboot, and my program's >>>hash table wasn't as large because of it). >>> >>>Happy Holidays, >>> >>>KarinsDad >> >>good idea. I am too busy writing an article on CA 4 right now but if everybody >>would do a test on their favourite chess program we should get answers. >>-- >>Komputer Korner > >You are looking in the wrong place for this "leak". If a program exits, and >resources are not freed up, it is _not_ the program that is at fault, it is the >underlying operating system that is screwed up. Because once a process exits, >it is up to the operating system to release memory allocated by the process. > >I know of no way for a user program to cause such a problem unless the operating >system is hosed. IE this can't happen under linux unless a bug in the linux >kernel shows up... and we don't have many of those thankfully... This is probably true with linux. I'll ask my partner as he is a major linux supporter. However, the original posting was talking about Windows 95. In Windows 95, 98, and NT, the OS is not designed properly to recover resources (yes, Microsoft will tell you that it is, but all of these OSs do a poor job of it). In fact, the Visual C++ compiler is designed to not recover resources (such as objects) so that programmers can do some tricky things. However, I know of nobody who has that kind of talent (or at least uses it in that manner), hence, it would be nice if the compiler (or minimally the OS) allowed the option of recovering resources automatically without having to go through the hassle of double checking your code. Since this is not the case, you must go through that step. Any object you create, you must destroy. I believe that memory deallocates automatically better than objects and the C compilers are probably better than the C++ compilers. In fact, Microsoft recommends that you reboot your system every two hours. Why? Because it can become unstable since running multiple applications which have not been checked for memory leaks will almost invariably leak. Eventually, there would not be enough memory left to run a single application. The idea of having statistics on which chess applications have memory leaks and which do not is worthwhile (at least until the Microsoft compilers and OSs catch up with the rest of the world). Regards, KarinsDad
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.