- Timestamp:
- 2006-06-23T16:03:53Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 757551a3
- Parents:
- a832dd7
- Location:
- test/mm
- Files:
-
- 3 edited
-
falloc1/test.c (modified) (2 diffs)
-
falloc2/test.c (modified) (2 diffs)
-
mapping1/test.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
test/mm/falloc1/test.c
ra832dd7 r2e9eae2 56 56 allocated = 0; 57 57 for (i = 0; i < MAX_FRAMES >> order; i++) { 58 frames[allocated] = PA2KA(PFN2ADDR(frame_alloc_rc(order, FRAME_ATOMIC | FRAME_KA, &status)));58 frames[allocated] = frame_alloc_rc(order, FRAME_ATOMIC | FRAME_KA, &status); 59 59 60 60 if (ALIGN_UP(frames[allocated], FRAME_SIZE << order) != frames[allocated]) { … … 81 81 printf("Deallocating ... "); 82 82 for (i = 0; i < allocated; i++) { 83 frame_free( ADDR2PFN(KA2PA(frames[i])));83 frame_free(KA2PA(frames[i])); 84 84 } 85 85 printf("done.\n"); -
test/mm/falloc2/test.c
ra832dd7 r2e9eae2 66 66 allocated = 0; 67 67 for (i = 0; i < (MAX_FRAMES >> order); i++) { 68 frames[allocated] = PA2KA(PFN2ADDR(frame_alloc_rc(order, FRAME_ATOMIC | FRAME_KA, &status)));68 frames[allocated] = frame_alloc_rc(order, FRAME_ATOMIC | FRAME_KA, &status); 69 69 if (status == 0) { 70 70 memsetb(frames[allocated], FRAME_SIZE << order, val); … … 84 84 } 85 85 } 86 frame_free( ADDR2PFN(KA2PA(frames[i])));86 frame_free(KA2PA(frames[i])); 87 87 } 88 88 printf("Thread #%d (cpu%d): Finished run.\n", THREAD->tid, CPU->id); -
test/mm/mapping1/test.c
ra832dd7 r2e9eae2 48 48 printf("Memory management test mapping #1\n"); 49 49 50 frame0 = PA2KA(PFN2ADDR(frame_alloc(ONE_FRAME, FRAME_KA)));51 frame1 = PA2KA(PFN2ADDR(frame_alloc(ONE_FRAME, FRAME_KA)));50 frame0 = frame_alloc(ONE_FRAME, FRAME_KA); 51 frame1 = frame_alloc(ONE_FRAME, FRAME_KA); 52 52 53 53 printf("Writing %#x to physical address %p.\n", VALUE0, KA2PA(frame0));
Note:
See TracChangeset
for help on using the changeset viewer.
