This commit is contained in:
Alex 2017-06-27 00:44:27 -05:00
commit 2683fd6f2f
2 changed files with 5 additions and 1 deletions

Binary file not shown.

View file

@ -75,6 +75,7 @@ int main() {
/* ---- PROCESS POOL -- */
//
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);
@ -85,7 +86,7 @@ int main() {
n_info_frames);
process_mem_pool.mark_inaccessible(MEM_HOLE_START_FRAME, MEM_HOLE_SIZE);
//
/* -- MOST OF WHAT WE NEED IS SETUP. THE KERNEL CAN START. */
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");
if (_allocs_to_go > 0) {
int n_frames = _allocs_to_go % 4 + 1;
Console::puti(n_frames);
unsigned long frame = _pool->get_frames(n_frames);
Console::puts("testing.");
int * value_array = (int*)(frame * (4 KB));
Console::puts("testing.");
for (int i = 0; i < (1 KB) * n_frames; i++) {
value_array[i] = _allocs_to_go;
}