To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 3217
3216  |  3218
Subject: 
Re: strange motor behaviour
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Wed, 2 Apr 2003 08:08:08 GMT
Viewed: 
2824 times
  
Tom Wouters wrote:
well, the RCX only has 32Kbyte of memory of wich half is used by brickOs
the remaining half should fit you user programm and all runtime stacks

(this should be your user programm of course)

and heaps, so allocating 40*40*2Bytes(the minimum for a pointer in an
32Kbyte adresspace) will need 3.2Kb.

and i've been a bit too quick, it should be 40*40*1 (you're allocating
char's), still thats' about 1.5kByte, that is, 1/10th of the memory
available to you as user, so the following reasoning still holds i think...

The RCX hasnt got any memory-protection either, therefor you can be
writing over the adressess where the motors get there data about speed
and direction..
so i guess with that malloc you're actually overwriting brickos's own
data...


Tom



Message is in Reply To:
  Re: strange motor behaviour
 
(...) well, the RCX only has 32Kbyte of memory of wich half is used by brickOs the remaining half should fit you user programm and all runtime stacks and heaps, so allocating 40*40*2Bytes(the minimum for a pointer in an 32Kbyte adresspace) will need (...) (22 years ago, 2-Apr-03, to lugnet.robotics.rcx.legos)

5 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR