Rev 988 | Rev 995 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 988 | Rev 994 | ||
|---|---|---|---|
| Line 32... | Line 32... | ||
| 32 | #include <stdio.h> |
32 | #include <stdio.h> |
| 33 | #include <unistd.h> |
33 | #include <unistd.h> |
| 34 | #include <stdlib.h> |
34 | #include <stdlib.h> |
| 35 | 35 | ||
| 36 | /* |
36 | /* |
| 37 | extern char _heap; |
- | |
| 38 | void test_mremap(void) |
37 | static void test_mremap(void) |
| 39 | { |
38 | { |
| 40 | printf("Writing to good memory\n"); |
39 | printf("Writing to good memory\n"); |
| 41 | mremap(&_heap, 120000, 0); |
40 | mremap(&_heap, 120000, 0); |
| 42 | printf("%P\n", ((char *)&_heap)); |
41 | printf("%P\n", ((char *)&_heap)); |
| 43 | printf("%P\n", ((char *)&_heap) + 80000); |
42 | printf("%P\n", ((char *)&_heap) + 80000); |
| Line 49... | Line 48... | ||
| 49 | 48 | ||
| 50 | printf("memory done\n"); |
49 | printf("memory done\n"); |
| 51 | } |
50 | } |
| 52 | */ |
51 | */ |
| 53 | /* |
52 | /* |
| 54 | extern char _heap; |
- | |
| 55 | static void test_sbrk(void) |
53 | static void test_sbrk(void) |
| 56 | { |
54 | { |
| 57 | printf("Writing to good memory\n"); |
55 | printf("Writing to good memory\n"); |
| 58 | printf("Got: %P\n", sbrk(120000)); |
56 | printf("Got: %P\n", sbrk(120000)); |
| 59 | printf("%P\n", ((char *)&_heap)); |
57 | printf("%P\n", ((char *)&_heap)); |
| Line 66... | Line 64... | ||
| 66 | *((&_heap) + 80000) = 10; |
64 | *((&_heap) + 80000) = 10; |
| 67 | 65 | ||
| 68 | printf("memory done\n"); |
66 | printf("memory done\n"); |
| 69 | } |
67 | } |
| 70 | */ |
68 | */ |
| 71 | - | ||
| 72 | /* |
69 | /* |
| 73 | extern char _heap; |
- | |
| 74 | static void test_malloc(void) |
70 | static void test_malloc(void) |
| 75 | { |
71 | { |
| 76 | char *data; |
72 | char *data; |
| 77 | 73 | ||
| 78 | data = malloc(10); |
74 | data = malloc(10); |