Merge branch 'master' of https://github.tamu.edu/shadow8t4/CSCE410
This commit is contained in:
commit
2683fd6f2f
2 changed files with 5 additions and 1 deletions
Binary file not shown.
|
@ -75,6 +75,7 @@ int main() {
|
||||||
|
|
||||||
/* ---- PROCESS POOL -- */
|
/* ---- PROCESS POOL -- */
|
||||||
|
|
||||||
|
//
|
||||||
unsigned long n_info_frames = ContFramePool::needed_info_frames(PROCESS_POOL_SIZE);
|
unsigned long n_info_frames = ContFramePool::needed_info_frames(PROCESS_POOL_SIZE);
|
||||||
|
|
||||||
unsigned long process_mem_pool_info_frame = kernel_mem_pool.get_frames(n_info_frames);
|
unsigned long process_mem_pool_info_frame = kernel_mem_pool.get_frames(n_info_frames);
|
||||||
|
@ -85,7 +86,7 @@ int main() {
|
||||||
n_info_frames);
|
n_info_frames);
|
||||||
|
|
||||||
process_mem_pool.mark_inaccessible(MEM_HOLE_START_FRAME, MEM_HOLE_SIZE);
|
process_mem_pool.mark_inaccessible(MEM_HOLE_START_FRAME, MEM_HOLE_SIZE);
|
||||||
|
//
|
||||||
/* -- MOST OF WHAT WE NEED IS SETUP. THE KERNEL CAN START. */
|
/* -- MOST OF WHAT WE NEED IS SETUP. THE KERNEL CAN START. */
|
||||||
|
|
||||||
Console::puts("Hello World!\n");
|
Console::puts("Hello World!\n");
|
||||||
|
@ -110,8 +111,11 @@ void test_memory(ContFramePool * _pool, unsigned int _allocs_to_go) {
|
||||||
Console::puts("alloc_to_go = "); Console::puti(_allocs_to_go); Console::puts("\n");
|
Console::puts("alloc_to_go = "); Console::puti(_allocs_to_go); Console::puts("\n");
|
||||||
if (_allocs_to_go > 0) {
|
if (_allocs_to_go > 0) {
|
||||||
int n_frames = _allocs_to_go % 4 + 1;
|
int n_frames = _allocs_to_go % 4 + 1;
|
||||||
|
Console::puti(n_frames);
|
||||||
unsigned long frame = _pool->get_frames(n_frames);
|
unsigned long frame = _pool->get_frames(n_frames);
|
||||||
|
Console::puts("testing.");
|
||||||
int * value_array = (int*)(frame * (4 KB));
|
int * value_array = (int*)(frame * (4 KB));
|
||||||
|
Console::puts("testing.");
|
||||||
for (int i = 0; i < (1 KB) * n_frames; i++) {
|
for (int i = 0; i < (1 KB) * n_frames; i++) {
|
||||||
value_array[i] = _allocs_to_go;
|
value_array[i] = _allocs_to_go;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue