Thread View: comp.sys.transputer
1 messages
1 total messages
Started by Victor Todd Norman
Wed, 17 Jan 1990 22:31
Dynamically determining memory size
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads