blob: 7be3ad22baf015727ebc9a396ac23296c028e419 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#define _POSIX_C_SOURCE 200809L
#include <stdio.h>
#include <unistd.h>
#include "mapalloc.h"
int main(void)
{
char *ptr = map_malloc(0);
long pagesize = sysconf(_SC_PAGESIZE);
printf("ptr: %p, pagesize %ld\n", ptr, pagesize);
ptr[0] = '\0';
printf("shouldn't get here\n");
}
|