Allocate big blocks of memory.
| 49 | |
| 50 | // Allocate big blocks of memory. |
| 51 | char * blockMalloc(ssize_t size) |
| 52 | { |
| 53 | char * retval = (char *)mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, 0, 0); |
| 54 | checkFSerrWithFilename((ssize_t)retval); |
| 55 | return retval; |
| 56 | } |
| 57 | |
| 58 | // Free big blocks of memory. Not the size is needed. |
| 59 | void blockFree(char * ptr, ssize_t size) |
no test coverage detected