TMG-L Archives

Archiver > TMG > 2002-03 > 1015205673


From: "Cliff Soderback" <>
Subject: Re: [TMG] Memory in Win 98 SE, Win ME,Win XP/XP Pro (was: Exhibit log)
Date: Sun, 3 Mar 2002 18:34:58 -0700
References: <5.1.0.14.0.20020302183300.00acca80@mail.fscv.net> <OE135uKxeSuPcw3LyyU00005116@hotmail.com> <5.1.0.14.0.20020302233030.0270f8f0@mail.fscv.net> <000501c1c2d8$d14159d0$60440142@master> <3C829515.687AFE21@infoave.net>


I will answer the questions and leave the original text so others will
know what we are talking about. I know this is somewhat Off Topic,
but it might answer some of the questions some might have.

>
> Is the error almost always in the code of the program that crashes? Or
> can a poorly written program cause other programs to crash?

Both

>
> I rarely have problems with Word locking up but it did so four times
> yesterday when I had two other programs open at the same time. Since
> it was Word that locked up, should I assume the error was in Word or
> could the error be in one of the other program's code and interfering
> with Word?

If you have more than one program running it can be any one of
them that causes the problem, without a debug dump it really is
impossible to tell.

>
> When two programs try to write to the same address in memory, one of
> them is wrong but how do I know which one? I figure it could happen
> two ways. Program A wrote to the address it had reserved but program B
> tried to use the same address. Thus program B is in error. Program A
> wrote to an address reserved by B and when B tried to write to that
> address, it crashed. Thus program A is in error.

The operating system(Windows in this case) contains many checks to be
sure all the programs stay in their own memory area. This is only a small
part of what is happening at any one time. I don't want to get too involved
because it is quite technical. If every program plays by the rules and
doesn't cheat, all will work. If a program violates any of these rules
it can affect any of the programs, an example is not restoring one of the
stacks.

>
> In either scenario the second program maybe should have had code to
> trap the error. If I were a programmer and following the rules, am I
> at fault if another program does not follow those rules? Is a
> programmer supposed to have enough foresight to plan for every
> possible way the rules might be violated by someone else? From what
> little I know of writing code, it is hard enough to get it right
> without planning for every possible mistake someone else might make in
> their code.

I am afraid everyone is responsible for his(or her) actions. If the rules
are
followed the programs will run and not leave traps for others. Memory must
be
freed and stacks restored. You would be surprised on how many so called
well written programs litterally leave a mess behind for others to clean up.
Windows NT(2000 and XP) have more protection against the offenders thus
they are more stable.

>
> Richard Brogger
>
>
To answer a question the some may have, how come you have to re-boot
to get the computer going again. Some programs do not shut down and
leave code fragments running, others clog up all the available memory
with garbage. They only way to clean this mess is to re-boot the computer.
This resets all the memory and closes all the programs and reopens them.
It is a lot more complicated than the above, but this is a simple
explanation
of what can happen.

Cliff Soderback





This thread: