Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: memory protection

Author: David Hanley

Date: 12:10:41 01/10/02

Go up one level in this thread


On January 10, 2002 at 14:49:57, Scott Gasch wrote:

>Hi David,
>
>> Also, in windows, you can leak references to DLL's which then get held in RAM.
>
>I don't fully understand this statement.  Are you saying that a usermode
>application can load a DLL, forget to free it, and thus "lock" the DLL in memory
>somehow?  That's true within the lifetime of that process.  But when the process
>that forgot to unload the DLL terminates the OS reclaims its virtual address
>space and thus "unloads" the DLL for it at that point.

No, look at the following page:

http://www.greystoke.demon.co.uk/Documents/Services/Tuition/MCP/70-016/CreatingManagingCOMComponents.htm

At the bottom of "creating objects"

If you don't free a COM, it will be leaked into system space.  It's very easy
for a crashing app to not clean up all of it's COM's.  That will typically lock
in the associated DLL as well.

There's a lot more examples of that, like the property atoms.


>
>>You can also screw up shared in-process DLL's.  Generally, those sorts of things
>>are much harder in linux, or not possible.
>
>I don't know what this means.

Well, the only way to really do something like this in linux is to create a
named pipe or block of shared RAM and never free it.  However, that's much less
common than COM's on which many windows progrms must rely.

>
>>I dual-boot NT and linux, and linux has crashed once on me, but i have to
>>restart windows every few days or else it will crash for sure ( it does crash if>i forget to reboot ).
>
>If you are running 2k or XP and you are seeing crashes once a week I would be
>willing to bet that the cause is a bad device driver.

I see them several times a week... Almost daily.

> Bugs in the NT kernel at
>this point do exist but they are very few and far between.  In my experience the
>only difference between linux and windows in terms of stability now is the
>quality of the driver code running on each.  It seems like the calibre of the
>driver writer on linux is higher than the calibre of the driver writer on
>windows for whatever reason.  But put a bad driver on either one and there goes
>the system.

Well, i'm 99% sure it's because of our buggy apps.  If i don't run these apps
for awhile, the system is much better.

dave

> I try to stay with "signed" drivers (though this is hard to do
>sometimes).

Probably a good idea.

dave



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.