Rev 2028 | Rev 2042 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2028 | Rev 2029 | ||
---|---|---|---|
Line 29... | Line 29... | ||
29 | #include <test.h> |
29 | #include <test.h> |
30 | #include <mm/slab.h> |
30 | #include <mm/slab.h> |
31 | #include <print.h> |
31 | #include <print.h> |
32 | #include <proc/thread.h> |
32 | #include <proc/thread.h> |
33 | #include <arch.h> |
33 | #include <arch.h> |
34 | #include <panic.h> |
- | |
35 | #include <mm/frame.h> |
34 | #include <mm/frame.h> |
36 | #include <memstr.h> |
35 | #include <memstr.h> |
37 | #include <synch/condvar.h> |
36 | #include <synch/condvar.h> |
38 | #include <synch/mutex.h> |
37 | #include <synch/mutex.h> |
39 | 38 | ||
Line 86... | Line 85... | ||
86 | 85 | ||
87 | printf("Allocating to cache1...\n"); |
86 | printf("Allocating to cache1...\n"); |
88 | for (i=0; i<30; i++) { |
87 | for (i=0; i<30; i++) { |
89 | data1 = slab_alloc(cache1, FRAME_ATOMIC); |
88 | data1 = slab_alloc(cache1, FRAME_ATOMIC); |
90 | if (!data1) { |
89 | if (!data1) { |
91 | panic("Incorrect memory size - use another test."); |
90 | printf("Incorrect memory size - use another test."); |
- | 91 | return; |
|
92 | } |
92 | } |
93 | memsetb((uintptr_t)data1, ITEM_SIZE, 0); |
93 | memsetb((uintptr_t)data1, ITEM_SIZE, 0); |
94 | *((void **)data1) = olddata1; |
94 | *((void **)data1) = olddata1; |
95 | olddata1 = data1; |
95 | olddata1 = data1; |
96 | } |
96 | } |