SUSE Conversations


PageSize



By:

July 16, 2007 3:45 pm

Reads:310

Comments:0

Score:Unrated

Print/PDF

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.

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.
Loading...Loading...


Categories: Free Tools, Technical Solutions

Disclaimer: As with everything else at SUSE Conversations, this content is definitely not supported by SUSE (so don't even think of calling Support if you try something and it blows up).  It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.

Comment

RSS