Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Main Page
Related Pages
Topics
Namespaces
Data Structures
Files
File List
Globals
EXTERNAL_HEADERS
RSL
etc
config
src
MADVISE.cpp
Go to the documentation of this file.
1
// checking for madvise() in <sys/mman.h>
2
3
25
#include <sys/mman.h>
// for madvise(), MADV_WILLNEED
26
#include <sys/types.h>
// for caddr_t
27
28
29
int
main
(
int
argc,
char
*argv[])
30
{
31
const
caddr_t
addr
= (caddr_t)argv;
32
33
const
int
result
= madvise (
addr
, argc, MADV_WILLNEED);
34
35
if
(1 < argc) {
36
// invoke with any command line arguments to test
37
return
result
;
38
}
39
40
// always succeed when invoked without arguments
41
return
0;
42
}
addr
#define addr
Definition
17.names.cpp:446
result
volatile int result
Definition
18.limits.traps.stdcxx-624.cpp:35
main
#define main
Definition
BAD_ALLOC_COPY_CTOR.cpp:32
Generated by
1.9.8