PageSize

Share

by Randy Goddard

Occasionally, when developing scripts or programs it is useful to know the memory page size on a host. In most cases that is the granularity of memory management on the host’s CPU, e.g. 4096 bytes on a typical x86 at the time of writing. The primary memory manager in the Linux kernel typically uses this as its smallest allocation unit. Note that there are secondary memory managers in Linux that provide arbitrary allocation granularity.

PageSize is a simple program (with equally simple C source code) that retrieves the system page size, in bytes, using a standard access method. In addition, I have included a GUI version of the program that, as much as anything, is intended as a simple example of a Qt application written using Eclipse (www.eclipse.org). Thanks to David Mair for mentoring me through that particular implementation.

(Visited 1 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *

No comments yet

Avatar photo
6,954 views