.\" -*- coding: UTF-8 -*- .\" Copyright (C) 2001 Andries Brouwer .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH getpagesize 2 "30 Marzo 2023" "Páginas de manual de Linux 6.05.01" .SH NOMBRE getpagesize \- obtiene el tamaño de página de memoria .SH BIBLIOTECA Biblioteca Estándar C (\fIlibc\fP, \fI\-lc\fP) .SH SINOPSIS .nf \fB#include \fP .PP \fBint getpagesize(void);\fP .fi .PP .RS -4 Requisitos de Macros de Prueba de Características para glibc (véase \fBfeature_test_macros\fP(7)): .RE .PP \fBgetpagesize\fP(): .nf .\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED Since glibc 2.20: _DEFAULT_SOURCE || ! (_POSIX_C_SOURCE >= 200112L) glibc 2.12 to glibc 2.19: _BSD_SOURCE || ! (_POSIX_C_SOURCE >= 200112L) Before glibc 2.12: _BSD_SOURCE || _XOPEN_SOURCE >= 500 .fi .SH DESCRIPCIÓN La función \fBgetpagesize\fP() devuelve el número de bytes de una página de memoria, donde una "página" es un bloque de longitud fija, la unidad de ubicación de memoria y mapeo de archivo realizado por \fBmmap\fP(2). .SH ESTÁNDARES None. .SH HISTORIAL This call first appeared in 4.2BSD. SVr4, 4.4BSD, SUSv2. In SUSv2 the \fBgetpagesize\fP() call is labeled LEGACY, and in POSIX.1\-2001 it has been dropped; HP\-UX does not have this call. .SH NOTAS 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 (muchos sistemas también permiten el sinónimo \fB_SC_PAGE_SIZE\fP por \fB_SC_PAGESIZE\fP.) .PP Whether \fBgetpagesize\fP() is present as a Linux system call depends on the architecture. If it is, it returns the kernel symbol \fBPAGE_SIZE\fP, whose value depends on the architecture and machine model. Generally, one uses binaries that are dependent on the architecture but not on the machine model, in order to have a single binary distribution per architecture. This means that a user program should not find \fBPAGE_SIZE\fP at compile time from a header file, but use an actual system call, at least for those architectures (like sun4) where this dependency exists. Here glibc 2.0 fails because its \fBgetpagesize\fP() returns a statically derived value, and does not use a system call. Things are OK in glibc 2.1. .SH "VÉASE TAMBIÉN" \fBmmap\fP(2), \fBsysconf\fP(3) .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Miguel Pérez Ibars y Marcos Fouces . .PP Esta traducción es documentación libre; lea la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. .PP Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a .MT debian-l10n-spanish@lists.debian.org .ME .