On 7/24/06, Parav Pandit <paravpandit@xxxxxxxxx> wrote:
> > I want to configure my i386 based 2.6 Linux system
> for
> > only 512Mbytes of virtual memory instead of 4GB.
> >
> > Where should I do the modifications to achieve
> this?
> >
>
> No modifications needed. Just specify the
> appropriate mem= kernel
> commandline option at boot.
> See Documentation/kernel-parameters.txt for the
> details.
>
[Parav]
mem=nn option reduces the physical memory not virtual.
I want to reduce the total virtual memory in the
system and not the physical memory.
I have 512Mbyte of RAM in my RHEL 4.
I want:
Physical memory = 512Mbyte ( as it is)
Virtual memory = 1GB. ( reduced it to 1GB from
default)
I want to see the effect on page tables size, my
application and its performance due to the reduction
of virtual memory (if any)
Regards,
Parav Pandit
you can use getrlimit and setrlimit apis from the userspace to set the virtual memory
limit of a particular process. or else modify the rlimit field in the task_struct ie
current->rlimit[RLIMIT_AS].rlim_max="to your value" if you want to do it in the kernel
space.
regards
prashant