[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: WANTED: Programmer for comm stuff
In article <38h8jd$q8f@tuba.cit.cornell.edu>,
Jay Krell <jmk3@crux4.cit.cornell.edu> wrote:
> > For example, I expect to be able...xxx-fit memory allocation
> This is a tangent to the original thread, but what is xxx-fit memory
>allocation?
best fit, first fit...
Lets say I have 3 blocks of unused memory, 101K, 300K, and 400K
If my memory manager has in the unused block list:
first entry - pointer to the 400K block
2nd entry - pointer to the 101K block
3rd entry - pointer to the 300K block
sequence of events -- a program asks for 100K of memory... then another program
that's 350K in size tries to launch.
first fit: memory request gets back a pointer to the first entry, and then
the first entry will be a pointer to the remaining 300K of memory.
Then the program can't launch since there isn't 350K of free memory available.
bad case! (assume no VM)
best fit: memory request gets back the 2nd entry, and there's a 1K chunk left
there.. The 350K app has enough memory to run (in the first entry) and thus
runs.
--
unknown@apple.com Apple II Forever
These opinions are mine, not Apple's.