]> pd.if.org Git - pdclib.old/blob - platform/gandr/functions/_PDCLIB/_PDCLIB_freepages.c
[gandr]: implement /_PDCLIB_(alloc|free)pages/
[pdclib.old] / platform / gandr / functions / _PDCLIB / _PDCLIB_freepages.c
1 /* $Id$ */\r
2 \r
3 /* _PDCLIB_allocpages( int const )\r
4 \r
5    This file is part of the Public Domain C Library (PDCLib).\r
6    Permission is granted to use, modify, and / or redistribute at will.\r
7 */\r
8 \r
9 /* This is a stub implementation of _PDCLIB_allocpages\r
10 */\r
11 \r
12 #include <stdint.h>\r
13 #include <stddef.h>\r
14 #include <_PDCLIB_glue.h>\r
15 #include <errno.h>\r
16 #include <gd_bal.h>\r
17 \r
18 void _PDCLIB_freepages( void * p, size_t n )\r
19 {\r
20     int rv = 0;\r
21     if((rv = gd_free_pages( p, n ))) {\r
22         perror("_PDCLIB_freepages");\r
23         abort();\r
24     }\r
25 }\r
26 \r
27 #ifdef TEST\r
28 #include <_PDCLIB_test.h>\r
29 \r
30 int main( void )\r
31 {\r
32     return TEST_RESULTS;\r
33 }\r
34 \r
35 #endif\r