mmap2

Autres langues

Langue: ja

Autres versions - même langue

Version: 2007-06-01 (openSuse - 09/10/07)

Section: 2 (Appels système)

̾Á°

mmap2 - ¥Õ¥¡¥¤¥ë¤ä¥Ç¥Ð¥¤¥¹¤ò¥á¥â¥ê¤Ë¥Þ¥Ã¥×¤¹¤ë

½ñ¼°


#include <sys/mman.h>



void *mmap2(void *start, size_t length, int prot,

            int flags, int fd, off_t pgoffset);

ÀâÌÀ

mmap2() ¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï mmap(2) ¤ÈÁ´¤¯Æ±¤¸¤è¤¦¤ËÆ°ºî¤¹¤ë¡£ ¤¿¤À¤·ºÇ¸å¤Î°ú¤­¿ô¤Ë¤Ï¡¢¥Õ¥¡¥¤¥ë¤Î¥ª¥Õ¥»¥Ã¥È¤ò (¥Ð¥¤¥Èñ°Ì¤Ç¤Ï¤Ê¤¯) ¥·¥¹¥Æ¥à¤Î¥Ú¡¼¥¸¥µ¥¤¥º¤òñ°Ì¤È¤·¤Æ»ØÄꤹ¤ë¡£ ¤³¤ì¤Ë¤è¤ê¡¢32 ¥Ó¥Ã¥È¤Î off_t ¤ò»È¤¦¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬ (°ìÈÌŪ¤Ê¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤Ç¤Ï 2^44 ¥Ð¥¤¥È¤Þ¤Ç¤Î) ¤µ¤é¤ËÂ礭¤Ê¥Õ¥¡¥¤¥ë¤ò¥Þ¥Ã¥×¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ë¡£

ÊÖ¤êÃÍ

À®¸ù¤·¤¿¾ì¹ç¡¢ mmap2() ¤Ï¥Þ¥Ã¥×¤µ¤ì¤¿Îΰè¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£ ¥¨¥é¡¼¤Î¾ì¹ç¤Ï -1 ¤¬ÊÖ¤µ¤ì¤Æ¡¢ errno ¤¬Å¬ÀÚ¤ËÀßÄꤵ¤ì¤ë¡£

¥¨¥é¡¼

EFAULT
¥æ¡¼¥¶¶õ´Ö¤«¤é¥Ç¡¼¥¿¤ò¼èÆÀ¤¹¤ë¤È¤­¤ËÌäÂ꤬¤¢¤Ã¤¿¡£

½àµò

¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï Linux Æȼ«¤Ç¤¢¤ë¡£

Ãí°Õ

glibc ¤Ï¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤ËÂФ¹¤ë¥é¥Ã¥Ñ¡¼´Ø¿ô¤òÄ󶡤·¤Æ¤¤¤Ê¤¤¡£ syscall(2) ¤ò»È¤Ã¤Æ¸Æ¤Ó½Ð¤¹¤³¤È¡£

mmap2() ¤Ï¡¢Linux 2.3.31 °Ê¹ß¤Ç»ÈÍѲÄǽ¤Ç¤¢¤ë¡£ ¤³¤ì¤Ï Linux Æȼ«¤Î´Ø¿ô¤Ê¤Î¤Ç¡¢ °Ü¿¢À­¤ò¹Í¤¨¤¿¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç¤Ï»ÈÍѤ¹¤Ù¤­¤Ç¤Ê¤¤¡£ 32¥Ó¥Ã¥È¥·¥¹¥Æ¥à¤Ç¤Ï¡¢ mmap2() ¤Ï LFS (Large File Summit) ¤Î°ìÉô¤Ç¤¢¤ë mmap64() ´Ø¿ô¤ò¼ÂÁõ¤¹¤ë¤Î¤Ë»ÈÍѤµ¤ì¤Æ¤¤¤ë¡£

´ØÏ¢¹àÌÜ

getpagesize(2), mmap(2), mremap(2), msync(2), shm_open(3)