Rev 1197 | Rev 1250 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1197 | Rev 1228 | ||
|---|---|---|---|
| Line 92... | Line 92... | ||
| 92 | 92 | ||
| 93 | extern char _heap; |
93 | extern char _heap; |
| 94 | static void test_mremap(void) |
94 | static void test_mremap(void) |
| 95 | { |
95 | { |
| 96 | printf("Writing to good memory\n"); |
96 | printf("Writing to good memory\n"); |
| 97 | mremap(&_heap, 120000, 0); |
97 | as_area_resize(&_heap, 120000, 0); |
| 98 | printf("%P\n", ((char *)&_heap)); |
98 | printf("%P\n", ((char *)&_heap)); |
| 99 | printf("%P\n", ((char *)&_heap) + 80000); |
99 | printf("%P\n", ((char *)&_heap) + 80000); |
| 100 | *(((char *)&_heap) + 80000) = 10; |
100 | *(((char *)&_heap) + 80000) = 10; |
| 101 | printf("Making small\n"); |
101 | printf("Making small\n"); |
| 102 | mremap(&_heap, 16000, 0); |
102 | as_area_resize(&_heap, 16000, 0); |
| 103 | printf("Failing..\n"); |
103 | printf("Failing..\n"); |
| 104 | *((&_heap) + 80000) = 10; |
104 | *((&_heap) + 80000) = 10; |
| 105 | 105 | ||
| 106 | printf("memory done\n"); |
106 | printf("memory done\n"); |
| 107 | } |
107 | } |
| Line 303... | Line 303... | ||
| 303 | // test_advanced_ipc(); |
303 | // test_advanced_ipc(); |
| 304 | // test_connection_ipc(); |
304 | // test_connection_ipc(); |
| 305 | // test_hangup(); |
305 | // test_hangup(); |
| 306 | // test_slam(); |
306 | // test_slam(); |
| 307 | 307 | ||
| 308 | printf("Userspace task, taskid=%llX\n", get_task_id()); |
308 | printf("Userspace task, taskid=%llX\n", task_get_id()); |
| 309 | 309 | ||
| 310 | futex_initialize(&ftx, 1); |
310 | futex_initialize(&ftx, 1); |
| 311 | if (futex_down(&ftx) < 0) |
311 | if (futex_down(&ftx) < 0) |
| 312 | printf("Futex failed.\n"); |
312 | printf("Futex failed.\n"); |
| 313 | if (futex_up(&ftx) < 0) |
313 | if (futex_up(&ftx) < 0) |