[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to reduce page size to 1024 please

Posted on 2011-03-08
7
Medium Priority
?
459 Views
Last Modified: 2012-05-11
Hi,

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.

0
Comment
Question by:zizi21
  • 3
  • 2
  • 2
7 Comments
 
LVL 84

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.
0
 

Author Comment

by:zizi21
ID: 35077347
I use getpagesize of C
0
 

Author Comment

by:zizi21
ID: 35077428
I need it to be various size. One of it is 1024, 4096 and so on...Is that possible
0
Independent Software Vendors: 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 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 800 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: http://linux.die.net/man/2/getpagesize
0
 

Author Comment

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

Accepted Solution

by:
gheist earned 1200 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.
0
 
LVL 62

Expert Comment

by:gheist
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.
0

Featured Post

Technology Partners: 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!

Question has a verified solution.

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

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…
Suggested Courses
Course of the Month19 days, 14 hours left to enroll

873 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