Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1759 → Rev 1760

/kernel/trunk/test/mm/falloc1/test.c
55,7 → 55,7
printf("Allocating %d frames blocks ... ", 1 << order);
allocated = 0;
for (i = 0; i < MAX_FRAMES >> order; i++) {
frames[allocated] = PA2KA(PFN2ADDR(frame_alloc_rc(order, FRAME_ATOMIC | FRAME_KA, &status)));
frames[allocated] = frame_alloc_rc(order, FRAME_ATOMIC | FRAME_KA, &status);
if (ALIGN_UP(frames[allocated], FRAME_SIZE << order) != frames[allocated]) {
panic("Test failed. Block at address %p (size %dK) is not aligned\n", frames[allocated], (FRAME_SIZE << order) >> 10);
80,7 → 80,7
printf("Deallocating ... ");
for (i = 0; i < allocated; i++) {
frame_free(ADDR2PFN(KA2PA(frames[i])));
frame_free(KA2PA(frames[i]));
}
printf("done.\n");
}
/kernel/trunk/test/mm/falloc2/test.c
65,7 → 65,7
printf("Thread #%d (cpu%d): Allocating %d frames blocks ... \n", THREAD->tid, CPU->id, 1 << order);
allocated = 0;
for (i = 0; i < (MAX_FRAMES >> order); i++) {
frames[allocated] = PA2KA(PFN2ADDR(frame_alloc_rc(order, FRAME_ATOMIC | FRAME_KA, &status)));
frames[allocated] = frame_alloc_rc(order, FRAME_ATOMIC | FRAME_KA, &status);
if (status == 0) {
memsetb(frames[allocated], FRAME_SIZE << order, val);
allocated++;
83,7 → 83,7
failed();
}
}
frame_free(ADDR2PFN(KA2PA(frames[i])));
frame_free(KA2PA(frames[i]));
}
printf("Thread #%d (cpu%d): Finished run.\n", THREAD->tid, CPU->id);
}
/kernel/trunk/test/mm/mapping1/test.c
47,8 → 47,8
 
printf("Memory management test mapping #1\n");
 
frame0 = PA2KA(PFN2ADDR(frame_alloc(ONE_FRAME, FRAME_KA)));
frame1 = PA2KA(PFN2ADDR(frame_alloc(ONE_FRAME, FRAME_KA)));
frame0 = frame_alloc(ONE_FRAME, FRAME_KA);
frame1 = frame_alloc(ONE_FRAME, FRAME_KA);
 
printf("Writing %#x to physical address %p.\n", VALUE0, KA2PA(frame0));
*((__u32 *) frame0) = VALUE0;