[Simh] Excessive paging of the real machine running SIMH - VAX

Richard Davis richard_a_davis_2 at btinternet.com
Tue Jul 17 06:56:24 EDT 2007


Ok, firstly I will admit openly that I'm most definitely not the best C/C++
programmer on the planet, and I know next to bu@@er all about the Microsoft
C runtime.

 

However, after compiling a debug version of SIMH 3.7-2 under Visual C++ 2005
(thanks to Jason Stevens for his project file) I thought I'd try and suss
out what is occurring with the excessive paging/disk access issue when
running VMS on XP.

 

Well, it seems that the _flag member of the FILE structure (_iobuf structure
in stdio.h) used in the stream operations for the disk units is becoming
corrupted (I don't know where yet).

 

As far as I'm aware (please correct me if I'm wrong), the _flag member
should only ever hold an 8 bit value (even though the member is an int in
size) as defined by the _IO definitions in stdio.h

 

On the occasions that the excessive paging/disk accesses occur I have seen
the _flag member hold 0x80XX, where the XX is one of the normal stream
states, to my way of thinking it looks like something might be trying to
reset the _flag member to _IORW but somehow is writing to the upper 8 bits
of the member???!

 

The above state seems to occur when sim_fseek is called to seek to near the
end of the disk file. as a result of the _flag member being 'corrupted' the
C runtime calls _flush which then flushes the whole disk file!! And hence
the huge amount of disk activity.

 

What is bizarre is that the problem/symptoms are inconsistent. if you want
it to fail.. it wont!... once it's worked ok.. it continues to work ok.. its
almost like some undeclared memory is being used.. and the behaviour just
depends on what is lurking in that memory location at the time.

 

Anyone else got any ideas?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20070717/20f43cc6/attachment-0003.html>


More information about the Simh mailing list