Subject:
|
malloc() bug found -- BAD MEMORY REGION :-(
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Wed, 1 Mar 2000 21:12:09 GMT
|
Viewed:
|
1463 times
|
| |
| |
It looks like it's not a bug in legOS, but in the RCX hardware:
Memory from 0xfb80 to 0xfd7f is simply NOT WRITEABLE, or more exactly,
always read as 0xff, at least on my RCX !
Try the following little test:
//
// memory test
//
#include <conio.h>
#define ADDRESS 0xfb80
#define value 0x7777
int main(int argc,char *argv[])
{
volatile size_t *addrp = ADDRESS;
*addrp = value;
cputw(*addrp);
return 0;
}
On my RCX, this displays FFFF. If anybody has a RCX, where 7777 appears
when this program is run, i'd be very interested to hear about.
To make the legOS kernel ignore this bad range, change one line in mm.c,
function mm_init().
Replace:
MM_BLOCK_RESERVED(0xfd80); // vectors
by
MM_BLOCK_RESERVED(0xfb80); // not writeable
i'll go ahead now and check if this fixes my dll hangups. Hopefully
there are no more dead regions in memory. Perhaps we should add some
code to mm_init that checks for bad regions and marks them as reserved ?
so long, Martin
|
|
Message has 1 Reply:
10 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|