.\" -*- 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. September 2017" Linux Linux\-Programmierhandbuch .SH BEZEICHNUNG getpagesize \- gibt die Größe einer Speicherseite zurück .SH ÜBERSICHT \fB#include \fP .PP \fBint getpagesize(void);\fP .PP .in -4n Mit Glibc erforderliche Makros (siehe \fBfeature_test_macros\fP(7)): .in .PP \fBgetpagesize\fP(): .ad l .RS 4 .PD 0 .TP 4 Seit Glibc 2.19: .nf _DEFAULT_SOURCE || ! (_POSIX_C_SOURCE\ >=\ 200112L) .TP 4 .fi Von Glibc 2.12 bis 2.19: .nf _BSD_SOURCE || ! (_POSIX_C_SOURCE\ >=\ 200112L) .TP 4 .fi .\" || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED Vor Glibc 2.12: _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 .PD .RE .ad b .SH BESCHREIBUNG .\" .SH HISTORY .\" This call first appeared in 4.2BSD. Die Funktion \fBgetpagesize\fP() gibt die Anzahl der Byte in einer Speicherseite zurück. »Seite« ist hier ein Block fester Größe, dessen Größe \fBmmap\fP(2) als Einheit für die Speicherzuordnung und die Dateiabbildung (file mapping) verwendet. .SH "KONFORM ZU" SVr4, 4.4BSD, SUSv2. In SUSv2 wurde der Systemaufruf \fBgetpagesize\fP() als VERALTET gekennzeichnet und fiel in POSIX.1\-2001 weg; in HP\-UX kommt er nicht vor. .SH ANMERKUNGEN Portable Programme sollten \fIsysconf(_SC_PAGESIZE)\fP statt \fBgetpagesize\fP() verwenden: .PP .in +4n .EX #include long sz = sysconf(_SC_PAGESIZE); .EE .in .PP (Die Mehrzahl der Systeme erlaubt die Verwendung des Synonyms \fB_SC_PAGE_SIZE\fP für \fB_SC_PAGESIZE\fP.) .PP Die Verfügbarkeit des Systemaufrufs \fBgetpagesize\fP() auf einem Linux\-System ist architekturabhängig. Ist er verfügbar, gibt er das Kernel\-Symbol \fBPAGE_SIZE\fP zurück. Dessen Wert hängt ab von der Architektur und dem Modell der Maschine. Generell werden Binärdateien verwendet, die von der Architektur abhängen, aber nicht vom Modell, um eine einzige binäre Distribution pro Architektur haben. Das bedeutet, dass ein Benutzerprogramm \fBPAGE_SIZE\fP nicht bei der Kompilierung aus einer Header\-Datei bestimmen, sondern den entsprechenden Systemaufruf verwenden sollte. Das gilt zumindest für jene Architekturen (wie sun4), für die diese Abhängigkeit besteht. Hier scheitert Glibc 2.0, weil ihre \fBgetpagesize\fP() einen statisch abgeleiteten Wert zurück gibt und keinen Systemaufruf verwendet. Dies ist in Glibc 2.1 in Ordnung. .SH "SIEHE AUCH" \fBmmap\fP(2), \fBsysconf\fP(3) .SH KOLOPHON Diese Seite ist Teil der Veröffentlichung 4.16 des Projekts Linux\-\fIman\-pages\fP. Eine Beschreibung des Projekts, Informationen, wie Fehler gemeldet werden können sowie die aktuelle Version dieser Seite finden sich unter \%https://www.kernel.org/doc/man\-pages/. .SH ÜBERSETZUNG Die deutsche Übersetzung dieser Handbuchseite wurde von Regine Bast , Martin Eberhard Schauer und Mario Blättermann erstellt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die GNU General Public License Version 3 oder neuer bezüglich der Copyright-Bedingungen. Es wird KEINE HAFTUNG übernommen. Wenn Sie Fehler in der Übersetzung dieser Handbuchseite finden, schicken Sie bitte eine E-Mail an .