blob: 8bb1681ab3df9c899392ac99bebec5df03c738d7 (
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(1);
long pagesize = sysconf(_SC_PAGESIZE);
printf("ptr: %p, pagesize %ld\n", ptr, pagesize);
ptr[pagesize] = '\0';
printf("shouldn't get here\n");
}
|