Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: is the

Author: Amir Ban

Date: 09:34:38 07/29/98

Go up one level in this thread


On July 29, 1998 at 10:08:11, Bruce Moreland wrote:

>This is talking about how the executable file is loaded into RAM.  This would be
>done before the first instruction is executed, obviously.
>

I don't know if affects the rest of your argument, but the above statement is
false.

Strange as it may sound, the first instruction is usually executed before any of
the executable is loaded. This is true for the VxD's, and Win32 applications and
DLL's. When one of these are started, Windows loads *nothing* but lets the
application get loaded automatically to memory through the mechanism of
demand-paging, meaning that individual pages of the executable are brought into
memory only if and when they are actually executed, in response to a page fault
that is generated from the attempt to execute non-existent memory. This also
means that the executable is loaded in parts, and in timing that depends on what
the executable actually does.

This was invented in Unix, and the Win32 exe-file format is more or less taken
over from the Unix coff format.

The old Win16 and DOS VM applications get loaded in the conventional way that
you assumed.

Amir




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.