How to reduce page size to 1024 please

Posted on 2011-03-08
Last Modified: 2012-05-11

I am reading the page size on the unix of mac and I am getting the page size to be 8192. I need it to be 1024. Is there a command that i could use. Thanks v. much.

Question by:zizi21
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
LVL 83

Expert Comment

by:Dave Baldwin
ID: 35077188
How are you reading the screen size?  My Linux boxes keep trying to use a 'virtual screen' but I don't like having to move it around to see all of it.

Author Comment

ID: 35077347
I use getpagesize of C

Author Comment

ID: 35077428
I need it to be various size. One of it is 1024, 4096 and so on...Is that possible
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 200 total points
ID: 35077473
Ok, that's the memory page size in bytes for mmap().  I don't think you get to resize it.  Here's the Man page:

Author Comment

ID: 35078950
Thanks. I am reading the link now.
LVL 62

Accepted Solution

gheist earned 300 total points
ID: 35088232
Memory pages are fixed for each processor.
x86 - 4k PPC - 8k SPARC - 2k

You can tune your program to adapt structures to page size.
LVL 62

Expert Comment

ID: 35136760
PS linux does 2M or 4M big pages now transparently, AIX does similar thing for PPC64 and solaris for x86(_64) and sparc64.
that lets you optimize memory use by your software even better (linux ... transparently means that 2m malloc+mlock will use one page table entry), for rest you need to use specific APIs to accomplish same, so it is best to put system-specific malloc optimizations in a separate header/module, to keep application portable.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question