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 / 3350
3349  |  3351
Subject: 
Re: Modifying the BrickOS source code
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Tue, 15 Jul 2003 22:55:07 GMT
Viewed: 
2855 times
  
Here is a visual representation:

[  KERNEL  ]mm_start[  HEAP  ]

The heap will contain ALL of the following:  User Programs, User
Allocated memory, Kernel allocated memory (not including static/global
variables and constants).

The only thing that is prior to mm_start is the Kernel (code and variables)

You will discover that the memory manager and other parts of the code
will check pointers for "less than mm_start" as well as "greater than
mm_start".  This is done for various reasons including:
... Is the calling code part of the kernel or a user program?
... Have I reached the end of memory (pointer will wrap to the beginning)

Hopefully this is more clear; it is a challenging piece to explain.
// Joe


Michael Martelli wrote:

In lugnet.robotics.rcx.legos, Joseph Woolley wrote:

However, it is worth noting, mm_start is the end of the Kernel code.  So
mm_start is also used to determine if a piece of code is part of the
kernel or a user program.  User programs are located above mm_start
since the kernel will allocate memory for them when they are downloaded
(dll)


Thanks for the description Joe, but in the above paragraph you seem to
contradict yourself, you say that mm_start is the end of kernel mode, but alos
that user programs are located above mm_start

I do not understand that part, did you mean user programs are located below
mm_start? or am I just not seeing the big picture here?

Thanks,
Mike



Message has 1 Reply:
  Re: Modifying the BrickOS source code
 
Thanks Joe, it makes sense now and I understand it is something that is difficutl to explain esp, through a message board. Thanks for helping me out... Mike (21 years ago, 15-Jul-03, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: Modifying the BrickOS source code
 
(...) Thanks for the description Joe, but in the above paragraph you seem to contradict yourself, you say that mm_start is the end of kernel mode, but alos that user programs are located above mm_start I do not understand that part, did you mean (...) (21 years ago, 15-Jul-03, to lugnet.robotics.rcx.legos)

12 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
    

Custom Search

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