JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。
... _SOURCE /* feature_test_macros (7) 参照 */ #include < sys/mman.h > int pkey_mprotect(void * addr , size_t len , int prot , int pkey ); 説明 mprotect () は、区間 [ addr , addr + len -1] ... uced as part of the futex (2) implementation (in order to guarantee the ability to perform atomic operations required by commands such as FUTEX_WAIT ), but is not currently used in on any architecture. PROT_SAO (Linux 2.6.26 以降) The memory should h ... #include < signal.h > #include < stdio.h > #include < malloc.h > #include < stdlib.h > #include < errno.h > #include < sys/mman.h > #define handle_error(msg) \ do { perror(msg); exit(EXIT_FAILURE); } while (0) static char *buffer; static void handler ... ... _SOURCE /* feature_test_macros (7) 参照 */ #include < sys/mman.h > int pkey_mprotect(void * addr , size_t len , int prot , int pkey ); 説明 mprotect () は、区間 [ addr , addr + len -1] ... uced as part of the futex (2) implementation (in order to guarantee the ability to perform atomic operations required by commands such as FUTEX_WAIT ), but is not currently used in on any architecture. PROT_SAO (Linux 2.6.26 以降) The memory should h ... #include < signal.h > #include < stdio.h > #include < malloc.h > #include < stdlib.h > #include < errno.h > #include < sys/mman.h > #define handle_error(msg) \ do { perror(msg); exit(EXIT_FAILURE); } while (0) static char *buffer; static void handler ... ... Existing seals: WRITE SHRINK プログラムのソース: t_memfd_create.c #define _GNU_SOURCE #include < stdint.h > #include < sys/mman.h > #include < fcntl.h > #include < stdlib.h > #include < unistd.h > #include < string.h > #include < stdio.h > #define er ... fd = memfd_create(name, MFD_ALLOW_SEALING); if (fd == -1) errExit("memfd_create"); /* Size the file as specified on the command line */ if (ftruncate(fd, len) == -1) errExit("truncate"); printf("PID: %jd; fd: %d; /proc/%jd/fd/%d\n", (intmax_t) getpi ... d(), fd, (intmax_t) getpid(), fd); /* Code to map the file and populate the mapping with data omitted */ /* If a 'seals' command-line argument was supplied, set some seals on the file */ if (seals_arg != NULL) { seals = 0; if (strchr(seals_arg, 'g') ... ... ... ... ... is to define a structure that will be imposed on the memory object that is shared between the two programs. #include < sys/mman.h > #include < fcntl.h > #include < semaphore.h > #include < sys/stat.h > #include < stdio.h > #include < stdlib.h > #incl ... プログラムのソース: pshm_ucase_bounce.c The "bounce" program creates a new shared memory object with the name given in its command-line argument and sizes the object to match the size of the shmbuf structure defined in the header file. It then maps the ... closed. */ shm_unlink(shmpath); exit(EXIT_SUCCESS); } プログラムのソース: pshm_ucase_send.c The "send" program takes two command-line arguments: the pathname of a shared memory object previously created by the "bounce" program and a string that is to ... ... is to define a structure that will be imposed on the memory object that is shared between the two programs. #include < sys/mman.h > #include < fcntl.h > #include < semaphore.h > #include < sys/stat.h > #include < stdio.h > #include < stdlib.h > #incl ... プログラムのソース: pshm_ucase_bounce.c The "bounce" program creates a new shared memory object with the name given in its command-line argument and sizes the object to match the size of the shmbuf structure defined in the header file. It then maps the ... closed. */ shm_unlink(shmpath); exit(EXIT_SUCCESS); } プログラムのソース: pshm_ucase_send.c The "send" program takes two command-line arguments: the pathname of a shared memory object previously created by the "bounce" program and a string that is to ... ... ルの必要なページのメモリー マッピングを作成し、 write (2) を使って所望のバイトを出力する。 プログラムのソース #include < sys/mman.h > #include < sys/stat.h > #include < fcntl.h > #include < stdio.h > #include < stdlib.h > #include < unistd.h > #define ... ... ルの必要なページのメモリー マッピングを作成し、 write (2) を使って所望のバイトを出力する。 プログラムのソース #include < sys/mman.h > #include < sys/stat.h > #include < fcntl.h > #include < stdio.h > #include < stdlib.h > #include < unistd.h > #define ... 日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。