PageSize
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.
Related Articles
Mar 27th, 2023
SUSE Joins the Confidential Computing Consortium
Jun 04th, 2024
No comments yet