Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

getpagesizes(3) [centos man page]

GETPAGESIZES(3) 					     Library Functions Manual						   GETPAGESIZES(3)

NAME
getpagesizes - Get the system supported huge page sizes SYNOPSIS
#include <hugetlbfs.h> int getpagesizes(long pagesizes[], int n_elem); DESCRIPTION
The getpagesizes() function returns either the number of system supported page sizes or the sizes themselves. If pagesizes is NULL and n_elem is 0, then the number of pages the system supports is returned. Otherwise, pagesizes is filled with at most n_elem page sizes. RETURN VALUE
On success, either the number of page sizes supported by the system or the number of page sizes stored in pagesizes is returned. On fail- ure, -1 is returned and errno is set appropriately. ERRORS
EINVAL n_elem is less than zero or n_elem is greater than zero and pagesizes is NULL. Also see opendir(3) for other possible values for errno. This error occurs when the sysfs directory exists but cannot be opened. NOTES
This call will return all page sizes as reported by the kernel. Not all of these sizes may be usable by the programmer since mount points may not be available for the huge page sizes. To test whether a size will be usable by libhugetlbfs, hugetlbfs_find_path_for_size() can be called on a specific size to see if a mount point is configured. SEE ALSO
oprofile(1), opendir(3), gethugepagesizes(3), libhugetlbfs(7) AUTHORS
libhugetlbfs was written by various people on the libhugetlbfs-devel mailing list. October 10, 2008 GETPAGESIZES(3)

Check Out this Related Man Page

getpagesizes(3C)					   Standard C Library Functions 					  getpagesizes(3C)

NAME
getpagesizes - get system supported page sizes SYNOPSIS
#include <sys/mman.h> int getpagesizes(size_t pagesize[], int nelem); DESCRIPTION
The getpagesizes() function returns either the number of different page sizes supported by the system or the actual sizes themselves. When called with nelem as 0 and pagesize as NULL, getpagesizes() returns the number of supported page sizes. Otherwise, up to nelem page sizes are retrieved and assigned to successive elements of pagesize[]. The return value is the number of page sizes retrieved and set in page- size[]. RETURN VALUES
Upon successful completion, the number of pagesizes supported or actually retrieved is returned. Otherwise, -1 is returned and errno is set to indicate the error. ERRORS
The getpagesizes() function will fail if: EINVAL The nelem argument is less than 0 or pagesize is NULL but nelem is non-zero. USAGE
The getpagesizes() function returns all the page sizes for which the hardware and system software provide support for the memcntl(2) com- mand MC_HAT_ADVISE. Not all processors support all page sizes or combinations of page sizes with equal efficiency. Applications programmers should take this into consideration when using getpagesizes(). ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
memcntl(2), mmap(2), getpagesize(3C), attributes(5) SunOS 5.10 14 May 2001 getpagesizes(3C)
Man Page

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Directory sizes

Can someone tell me how to read these damn sizes. i mean, i prefer to see sizes in MB but that is not the case when you do an ls -l on directories. i have a had time converting these to MB just for verification purposes, what would a directory size like this = 3499990308 represent in MB or... (3 Replies)
Discussion started by: TRUEST
3 Replies

2. Shell Programming and Scripting

Script for file names/sizes

How can I look at a certain directory and list all the file names, locations and sizes of each file in the current directory and all subdirectories? (2 Replies)
Discussion started by: ssmiths001
2 Replies

3. AIX

TUNING: memory page sizes

This is post number 3 in a series of unanswered "TUNING" questions. :D With AIX 5.3 TL4, the page size can vary from the original "4k". They can now be "64k" and a couple other sizes. They also do not have to all be the same. Some can remain "4k" while others are "64k" which is what seems to... (2 Replies)
Discussion started by: kah00na
2 Replies

4. UNIX for Dummies Questions & Answers

Directories sizes

Hello everyone, can anybody help me in finding a way to obtain a list of all the directories and their sizes. I would like to be able to run this and obtain an output like a tree structure with each branch saying how much space it is taking up . Hope you can point me in the right direction.... (1 Reply)
Discussion started by: gio001
1 Replies

5. UNIX for Dummies Questions & Answers

Compare two file sizes.

Hi everyone! I need to compare two file sizes. One of them (size) will be stored in a flat file and the other coming from a listed file. I can now get the first file size using: SIZE=`ls -l $DOCTYPE | awk '{print $5}'` 1. How can I store this value in a flat file? 2. How... (2 Replies)
Discussion started by: mrreds
2 Replies

6. UNIX for Advanced & Expert Users

df vs du for directory sizes

Is it better to use df or du to calculate directory sizes? I tried both and got different numbers with both. $ du -h /home 1.7G /home/bob1 1.7G /home $ df -h /home Filesystem Size Used Avail Use% Mounted on /dev/mapper/VG-lv_home 25G 1.9G 22G ... (2 Replies)
Discussion started by: cokedude
2 Replies

7. UNIX for Dummies Questions & Answers

Display Directories with their sizes in human readable format

Hi, I want to list all the directories present in a particular location and want to display their sizes as well. I know "ls -lh" but it doesn't show the size of the complete directory. So i want something like dir1 266 MB dir2 2 KB dir3 22 MB ... ... file1 10 Kb ..... Thanks Sarbjit (4 Replies)
Discussion started by: sarbjit
4 Replies

8. UNIX for Advanced & Expert Users

Files by size

I am new to Unix and need help. I have several files of different sizes Example: 1 GB , 2GB , 500 mb ,200mb and even small sizes. What I want is I want to pick files and sum of the combined file size should be less than 3 Gb and move them to a different directory. when I do ls -ltr I want to pcik... (1 Reply)
Discussion started by: pyarigreat
1 Replies

9. UNIX for Beginners Questions & Answers

Files by size

I am new to Unix and need help. I have several files of different sizes Example: 1 GB , 2GB , 500 mb ,200mb and even small sizes. What I want is I want to pick files and sum of the combined file size should be less than 3 Gb and move them to a different directory. when I do ls -ltr I want... (5 Replies)
Discussion started by: pyarigreat
5 Replies