mmap() マンページ:
そのプロトタイプは次のとおりです。
void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset);
と説明:
The mmap() function asks to map 'length' bytes starting at offset 'offset'
from the file (or other object) specified by the file descriptor fd into
memory, preferably at address 'start'.
具体的には、最後の引数について:
'offset' should be a multiple of the page size as returned by getpagesize(2).
私が実践したことから、ページ サイズの倍数でなければなりません。たとえば、offset
私の Linux では 4096です。Invalid argument
offset
ありがとう、