.\" -*- coding: UTF-8 -*- .\" Copyright (C) 2001 Andries Brouwer .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH GETPAGESIZE 2 "15 września 2017 r." Linux "Podręcznik programisty Linuksa" .SH NAZWA getpagesize \- pobranie rozmiaru strony pamięci .SH SKŁADNIA \fB#include \fP .PP \fBint getpagesize(void);\fP .PP .RS -4 Wymagane ustawienia makr biblioteki glibc (patrz \fBfeature_test_macros\fP(7)): .RE .PP \fBgetpagesize\fP(): .ad l .RS 4 .PD 0 .TP 4 Od glibc 2.19: .nf _DEFAULT_SOURCE || ! (_POSIX_C_SOURCE\ >=\ 200112L) .fi .TP 4 glibc 2.12 do 2.19: .nf _BSD_SOURCE || ! (_POSIX_C_SOURCE\ >=\ 200112L) .fi .TP 4 Przed glibc 2.12: .\" || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 .PD .RE .ad b .SH OPIS .\" .SH HISTORY .\" This call first appeared in 4.2BSD. The function \fBgetpagesize\fP() returns the number of bytes in a memory page, where "page" is a fixed\-length block, the unit for memory allocation and file mapping performed by \fBmmap\fP(2). .SH "ZGODNE Z" SVr4, 4.4BSD, SUSv2. W SUSv2 funkcja \fBgetpagesize\fP() jest oznaczona jako "pozostałość" ("LEGACY"), a w POSIX.1\-2001 została pominięta. HP\-UX nie zawiera tej funkcji. .SH UWAGI Portable applications should employ \fIsysconf(_SC_PAGESIZE)\fP instead of \fBgetpagesize\fP(): .PP .in +4n .EX #include long sz = sysconf(_SC_PAGESIZE); .EE .in .PP (Most systems allow the synonym \fB_SC_PAGE_SIZE\fP for \fB_SC_PAGESIZE\fP.) .PP Obecność \fBgetpagesize\fP() jako funkcji systemowej Linuksa zależy od architektury. Jeśli istnieje, zwracasymbol jądra \fBPAGE_SIZE\fP, który zależy od architektury i modelu maszyny. W ogólności, aby mieć jedną dystrybucję binarną dla każdej architektury, używa się binariów, które są zależne od architektury, ale nie od modelu maszyny. Oznacza to, że program użytkownika nie powinien określać PAGE_SIZE podczas kompilacji na podstawie plików nagłówkowych, a używać bieżącej funkcji systemowej, co najmniej dla tych architektur (np. sun4), dla których istnieje zależność \fBPAGE_SIZE\fP od modelu maszyny. W tym miejscu libc4, libc5 i glibc 2.0 zawodzą, gdyż ich \fBgetpagesize\fP() zwraca wartość wyliczoną statycznie, a nie korzysta funkcji systemowej. Wszystko jest OK w glibc 2.1. .SH "ZOBACZ TAKŻE" \fBmmap\fP(2), \fBsysconf\fP(3) .SH "O STRONIE" Angielska wersja tej strony pochodzi z wydania 5.10 projektu Linux \fIman\-pages\fP. Opis projektu, informacje dotyczące zgłaszania błędów oraz najnowszą wersję oryginału można znaleźć pod adresem \%https://www.kernel.org/doc/man\-pages/. .PP .SH TŁUMACZENIE Autorami polskiego tłumaczenia niniejszej strony podręcznika są: Andrzej Krzysztofowicz . .PP Niniejsze tłumaczenie jest wolną dokumentacją. Bliższe informacje o warunkach licencji można uzyskać zapoznając się z .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License w wersji 3 .UE lub nowszej. Nie przyjmuje się ŻADNEJ ODPOWIEDZIALNOŚCI. .PP Błędy w tłumaczeniu strony podręcznika prosimy zgłaszać na adres listy dyskusyjnej .MT manpages-pl-list@lists.sourceforge.net .ME .