crampus
August 7th, 2010, 10:25 AM
I have a little test program that includes:
...
#include <sys/mman.h>
...
data = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0);
...
I'm developing on 64-bit Ubuntu 10.4
Linux version 2.6.32-24-generic (buildd@yellow) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) )
The compiler complains:
...error: ‘MAP_ANONYMOUS’ undeclared (first use in this function)
While MAP_SHARED, for instance, is known from sys/mman.h. A bit of research
shows that sys/mman.h depends on ...include/bits/mman.h and __USE_MISC
to control the definition of MAP_ANONYMOUS vs. MAP_SHARED. I'm obviously
missing something quite about controlling non file-based inter-process shared memory use...?
any help much appreciated
crampus
...
#include <sys/mman.h>
...
data = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0);
...
I'm developing on 64-bit Ubuntu 10.4
Linux version 2.6.32-24-generic (buildd@yellow) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) )
The compiler complains:
...error: ‘MAP_ANONYMOUS’ undeclared (first use in this function)
While MAP_SHARED, for instance, is known from sys/mman.h. A bit of research
shows that sys/mman.h depends on ...include/bits/mman.h and __USE_MISC
to control the definition of MAP_ANONYMOUS vs. MAP_SHARED. I'm obviously
missing something quite about controlling non file-based inter-process shared memory use...?
any help much appreciated
crampus