hi all
I define the type with ENUM in number range [1-n] n is the Maximum number.
I will define this range to specify the array.
string[] array1=new string[1-n] // means start index for this array is 1 and finish index is n
how define this range?
similar this Pascal code[partion of algorithm Buddy System Allocation memory]
CONST NULL = -1;
TYPE address: NULL..m;
sizeindex: 1..n;
VAR
size : array[sizeindex] of 1..m;
subbuddy : array[sizeindex] of 0..n;
memory : array[0..m] of paced record
tag: (available,allocated);
a,b: (left,right):
index: sizeindex;
forward: address;
backward: address;
end;
tanks a lot.
Loading
VulpesPosted Apr 17, 2011, 11:40 AM
I thought you might be hoping to allocate managed memory 'for real' :)
hamed hossaniPosted Apr 17, 2011, 10:47 AM
I create simulation of buddy system allocation memory,very simple,based on this pdf(section 2 only)[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.79.6369&rep=rep1&type=pdf]
it,s display the process that input,we added input process and display into DataGridView,finally display added process to a PictureBox.
this is project for lab OS.
similar this link:
http://www.codeproject.com/KB/threads/PriorityQueueGeneric.aspx
tanks
VulpesPosted Apr 17, 2011, 5:40 AM