| 74 | } |
| 75 | |
| 76 | void test_calloc() { |
| 77 | stage("calloc"); |
| 78 | emmalloc_blank_slate_from_orbit(); |
| 79 | char* ptr = (char*)malloc(10); |
| 80 | ptr[0] = 77; |
| 81 | free(ptr); |
| 82 | char* cptr = (char*)calloc(10, 1); |
| 83 | assert(cptr == ptr); |
| 84 | assert(ptr[0] == 0); |
| 85 | } |
| 86 | |
| 87 | void test_realloc() { |
| 88 | stage("realloc0"); |