Determining Page Size on AMD64 Etch

Can I use sysctl or /proc/sys/kernel or something to see what my
page size is? My kernel is 2.6.18-3-amd64.

--

0

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Determining Page Size on AMD64 Etch

Matt Miller writes:

> Can I use sysctl or /proc/sys/kernel or something to see what my
> page size is? My kernel is 2.6.18-3-amd64.

Don't know about an entry in sysfs with that entry, but does

man 2 getpagesize

help?

--
-- Jhair

--

Determining Page Size on AMD64 Etch

> > see what my page size is?
>
> man 2 getpagesize

Thanks, that helped. I wrote the following C program which apparently tells me
that my pagesize is 4K:

#include
#include

int main ()
{
printf ("%d\n", getpagesize ());
return 0;
}

--

Determining Page Size on AMD64 Etch

On 12/29/06, Matt Miller wrote:
> > > see what my page size is?
> >
> > man 2 getpagesize
>
> Thanks, that helped. I wrote the following C program which apparently tells me
> that my pagesize is 4K:
>
> #include
> #include
>
> int main ()
> {
> printf ("%d\n", getpagesize ());
> return 0;
> }

Maybe I'm missing something, but why not just look at /proc/swaps?

--

Determining Page Size on AMD64 Etch

Owen Heisler writes:

> On 12/29/06, Matt Miller wrote:
>> > > see what my page size is?
>> >
>> > man 2 getpagesize
>>
>> Thanks, that helped. I wrote the following C program which
>> apparently tells me that my pagesize is 4K:
>>
>> #include
>> #include
>>
>> int main ()
>> {
>> printf ("%d\n", getpagesize ());
>> return 0;
>> }

> Maybe I'm missing something, but why not just look at /proc/swaps?

Because /proc/swaps doesn't show the memory page size.

--
-- Jhair

--

Determining Page Size on AMD64 Etch

On 1/1/07, Jhair Tocancipa Triana wrote:
> Owen Heisler writes:
> > On 12/29/06, Matt Miller wrote:
> >> > > see what my page size is?
> >> >
> >> > man 2 getpagesize
> >>
> >> Thanks, that helped. I wrote the following C program which
> >> apparently tells me that my pagesize is 4K:
> >>
> >> #include
> >> #include
> >>
> >> int main ()
> >> {
> >> printf ("%d\n", getpagesize ());
> >> return 0;
> >> }
>
> > Maybe I'm missing something, but why not just look at /proc/swaps?
>
> Because /proc/swaps doesn't show the memory page size.

Oh, I was thinking of the "pagefile size" in Windows, which means (at
least I thought it did) the amount of virtual memory in use. I see
now in the getpagesize man page that this rather is something to do
with how files are stored in memory. I learn more all the time!

--

Syndicate content