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 / 3413
  Question about mm.C in BrickOS
 
Hey My Senior Preoject where I update BrickOS is slowly taking shape (I am actually trying to do some now, but time is very limited). This project I am editing the Memory Managment Alg used by BrickOS. the first one I am going to add is Next Fit, it (...) (21 years ago, 13-Aug-03, to lugnet.robotics.rcx.legos)
 
  Re: Question about mm.C in BrickOS
 
(...) <snip> (...) I've never looked at brickOS code, but here is my take: By the time you hit line 2, you've found a free block that is big enough. Line 2 sets the owner of the block. Line 5 decides if the block is oversized enough to split. Line 6 (...) (21 years ago, 13-Aug-03, to lugnet.robotics.rcx.legos)
 
  Re: Question about mm.C in BrickOS
 
Hi, (...) Ptr points to the length byte of the first free block (...) *(ptr-1) actually is MM_FREE and is now set to the callers id. (...) Now we can do two things: We could grab all memory we found in this block or we could allocate only the memory (...) (21 years ago, 13-Aug-03, to lugnet.robotics.rcx.legos)
 
  Re: Question about mm.C in BrickOS
 
Thanks to both of you, I was pretty close to my understanding of it, but I did not know about the "new block creation behind the current block" but it makes sense now, if I have any other question (I am sure I will) I will def. ask. Thanks again, (...) (21 years ago, 14-Aug-03, to lugnet.robotics.rcx.legos)
 
  Re: Question about mm.C in BrickOS
 
(...) Michael I was reading through your reply you sent me a while back and I don't understand what that line in the code does and you explaination of it. I don't understand what is meant by pointing behind the block. Any help would be great thanks. (...) (21 years ago, 14-Sep-03, to lugnet.robotics.rcx.legos)
 
  Re: Question about mm.C in BrickOS
 
(...) +---- +------+---...---+--...-+-------- | pid | size | data..... | pid | size | data... *-----+------+---......-+-------- ^ +---...--- ptr points to that address. This is the memory layout for the data allocation pool. Pid is the process id of (...) (21 years ago, 15-Sep-03, to lugnet.robotics.rcx.legos)
 
  Re: Question about mm.C in BrickOS
 
(...) Yes it does, thank you very much Michael, you helped me out again. I just wasnt thinking of next as being a ptr like that. i just always thought it pointed to the address of the location of the memory that it can use next. thanks again... Mike (21 years ago, 15-Sep-03, to lugnet.robotics.rcx.legos)

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