Subject:
|
Re: My problems with adding a Best Fit algorithm for memory management to kernel/mm.c
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Sun, 7 Dec 2003 05:17:10 GMT
|
Viewed:
|
4223 times
|
| |
| |
In lugnet.robotics.rcx.legos, Michael Martelli wrote:
> The results I am getting a very odd.
>
> If I load this version of the OS and then load my testing program (one which
> mallocs a few blocks, then frees some, and then mallocs a few more and then
> finally scans user memory and prints out the memory layout, i.e. the address,
> PID, size of each block) then it seems to allocate everything fine, except for
> one random block of memory which is size 7 in the after all the of OS tasks are
> allocated.
>
> But if I turn the RCX off then on either:
> (a) after downloading the program or
> (b)after just running the program
> and then run the program again, all of the OS tasks that were allocated now
> somehow must have their PID set to MM_FREE and then they are all joined together
> as 1 free block of memory beginning at mm_start. And then after that the user
> program is allocated (and is fine throughout the whole process, nothing happens
> to it, its PID is fine) the OS tasks get allocated again, and then from any time
> after that the memory layout remains the same (i.e. no other blocks get reset
> and joined to create a giant free block of memory).
>
> Does anyone have any idea what is going on? And why?
>
> The rest of my mm.c file is the same as the original and the same as my Best Fit
> version which worls perfectly.
Hi Mike,
It would be helpful to see each of the memory block dumps and some notation as
to what actions you took between each dump (i.e. RCX on/off, program downloaded,
etc...)
Mark
|
|
Message has 1 Reply:
Message is in Reply To:
14 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
|
|
|
|