1 /* _PDCLIB_allocpages( int const )
3 This file is part of the Public Domain C Library (PDCLib).
4 Permission is granted to use, modify, and / or redistribute at will.
7 /* This is an example implementation of _PDCLIB_allocpages() (declared in
8 _PDCLIB_config.h), fit for use with POSIX kernels.
15 #include <_PDCLIB_glue.h>
17 void * _PDCLIB_allocpages( size_t n )
20 NULL, n * _PDCLIB_MALLOC_PAGESIZE, PROT_READ | PROT_WRITE,
21 MAP_ANON | MAP_PRIVATE, -1, 0);
23 if(addr != MAP_FAILED) {
33 #include <_PDCLIB_test.h>