SUSE Conversations


PageSize



By: rgoddard

July 16, 2007 3:45 pm

Reads:60

Comments:0

Rating:0

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.

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)


Categories: Free Tools, Technical Solutions

Comment

RSS