/kernel/trunk/test/mm/falloc1/test.c |
---|
54,13 → 54,13 |
printf("Allocating %d frames blocks ... ", 1 << order); |
allocated = 0; |
for (i = 0; i < MAX_FRAMES >> order; i++) { |
frames[allocated] = frame_alloc(order, FRAME_ATOMIC | FRAME_KA); |
frames[allocated] = (__address) frame_alloc(order, FRAME_ATOMIC | FRAME_KA); |
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); |
} |
if (status == 0) { |
if (frames[allocated]) { |
allocated++; |
} else { |
printf("done. "); |
/kernel/trunk/test/mm/falloc2/test.c |
---|
51,7 → 51,7 |
void falloc(void * arg) |
{ |
int status, order, run, allocated, i; |
int order, run, allocated, i; |
__u8 val = THREAD->tid % THREADS; |
index_t k; |
65,8 → 65,8 |
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] = frame_alloc_rc(order, FRAME_ATOMIC | FRAME_KA, &status); |
if (status == 0) { |
frames[allocated] = (__address)frame_alloc(order, FRAME_ATOMIC | FRAME_KA); |
if (frames[allocated]) { |
memsetb(frames[allocated], FRAME_SIZE << order, val); |
allocated++; |
} else { |