Article View: comp.sys.transputer
Article #471Dynamically determining memory size
From: Victor Todd Norman
Date: Wed, 17 Jan 1990 22:31
Date: Wed, 17 Jan 1990 22:31
22 lines
1327 bytes
1327 bytes
Question: Is there a way for a program to dynamically figure out how large the memory space is? I have tried to figure out this value by having my program write a value to memory and then read it back, checking if the value is the same. I start doing this somewhere that I know exists and try to walk off the end of memory. I was hoping that as soon as I fell off the end, the value would be changed. But, this doesn't work since, as I've found out, memory seems to wrap around. Example: I am using a T414 (2K on-chip) with 2M external memory. Thus, the highest address is #80200800. But, when I write a value to somewhere off in never-never land, like #802037be, I can read the value back from that location. Or, I can find the value in #800037be (which is where it actually exists all along). So, my idea of checking legal addresses by writing to them doesn't seem to work too well. Any suggestions? Victor Norman
Technical Details
Message-ID:
<9298@medusa.cs.purdue.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!ames!purdue!normanShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!ames!purdue!norman From: norman@cs.purdue.EDU (Victor Todd Norman) Newsgroups: comp.sys.transputer Subject: Dynamically determining memory size Message-ID: <9298@medusa.cs.purdue.edu> Date: 17 Jan 90 22:31:46 GMT Organization: Department of Computer Science, Purdue University Lines: 22