Path: 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 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