Subject:
|
Re: dont't fear the reaper
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Tue, 1 Aug 2000 00:16:36 GMT
|
Viewed:
|
1311 times
|
| |
| |
> This program runs up to 16 and stops. But when I stop the program with the
> run-key, the next run will stop a lot erlier. In fact, if I stop after the
> display of "3", the next run will only count up to 13. After a while, all
> memory is eaten up and the program won't start at all.
>
> The culprit for that is the routine mm_reaper in mm.c There are two lines
> reading:
>
> while(*ptr>=(size_t) &mm_start) { ...
>
> please change them both to:
>
> while(ptr>=(size_t) &mm_start) { ...
This change is correct, although it will not work by itself. Using
only this all memory will be freed when the RCX is powered off, including
program memory. To work correctly another change to tm.c is necessary,
so memory allocated by kernel processes is not freed.
The required changes are in CVS at sourceforge.
Thanks for reporting this problem.
Eddie C. Dost
ecd@skynet.be
|
|
Message has 1 Reply: | | Re: dont't fear the reaper
|
| (...) Actually, I'm using 0.2.4, last downloadable version. With this, the memory eating problem is solved with my stated patch. Might be, that the new version has the tm.c changes? (I just press "run" to stop my program, then "run" to start it (...) (24 years ago, 1-Aug-00, to lugnet.robotics.rcx.legos)
|
Message is in Reply To:
| | dont't fear the reaper
|
| I've tried to test the maximum memory allocation possible in legOS. For that, I wrote the following test program: #include <conio.h> #include <unistd.h> #include <stdlib.h> int main( int argc, char **argv ) { int i; char *cp; i = 1; while( ( cp = (...) (24 years ago, 31-Jul-00, to lugnet.robotics.rcx.legos)
|
10 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|