Changeset 9b9e385 in mainline for test/mm/falloc2/test.c
- Timestamp:
- 2006-02-05T16:08:27Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 266294a9
- Parents:
- 328e0d3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/mm/falloc2/test.c
r328e0d3 r9b9e385 61 61 for (run = 0; run < THREAD_RUNS; run++) { 62 62 for (order = 0; order <= MAX_ORDER; order++) { 63 printf("Thread #%d : Allocating %d frames blocks ... \n", THREAD->tid, 1 << order);63 printf("Thread #%d (cpu%d): Allocating %d frames blocks ... \n", THREAD->tid, CPU->id, 1 << order); 64 64 allocated = 0; 65 65 for (i = 0; i < (MAX_FRAMES >> order); i++) { 66 frames[allocated] = frame_alloc (FRAME_ATOMIC | FRAME_KA, order, &status, NULL);66 frames[allocated] = frame_alloc_rc(order, FRAME_ATOMIC | FRAME_KA, &status); 67 67 if (status == 0) { 68 68 memsetb(frames[allocated], FRAME_SIZE << order, val); … … 72 72 } 73 73 } 74 printf("Thread #%d : %d blocks allocated.\n", THREAD->tid, allocated);74 printf("Thread #%d (cpu%d): %d blocks allocated.\n", THREAD->tid, CPU->id, allocated); 75 75 76 printf("Thread #%d : Deallocating ... \n", THREAD->tid);76 printf("Thread #%d (cpu%d): Deallocating ... \n", THREAD->tid, CPU->id); 77 77 for (i = 0; i < allocated; i++) { 78 78 for (k = 0; k <= ((FRAME_SIZE << order) - 1); k++) { 79 79 if (((__u8 *) frames[i])[k] != val) { 80 printf("Thread #%d : Unexpected data (%d) in block %P offset %X\n", THREAD->tid, ((char *) frames[i])[k], frames[i], k);80 printf("Thread #%d (cpu%d): Unexpected data (%d) in block %P offset %X\n", THREAD->tid, CPU->id, ((char *) frames[i])[k], frames[i], k); 81 81 failed(); 82 82 } … … 84 84 frame_free(frames[i]); 85 85 } 86 printf("Thread #%d : Finished run.\n", val);86 printf("Thread #%d (cpu%d): Finished run.\n", THREAD->tid, CPU->id); 87 87 } 88 88 } 89 89 90 90 free(frames); 91 91 printf("Thread #%d (cpu%d): Exiting\n", THREAD->tid, CPU->id); 92 92 atomic_dec(&thread_count); 93 93 }
Note:
See TracChangeset
for help on using the changeset viewer.