Sub: Mapping big chunk of virtual memory / file to small physical
memory in kernel 2.4
Message:
Hi,
I am fixed in a particular problem. I have a linux box (pc-intel
celeron, kernel 2.4.18, redhat 8.0) with 1 GB RAM and a device driver
(related to network) that has mapped (mmap) 896 MB of memory (with 64
MB hole available) and the memory visible to the kernel is only 128 MB
(boot time param mem=128M). I need about 256 MB of more space on the
box for some driver enhancement (for loading a user given file) and
adding more RAM is not an option. At present I can think of only two
possible ways to do this.
(1) To do a vmalloc() for the 256 MB i need; copy the file in it and
then introduce some sort of paging algorithm to map this virtual memory
to the avaiable hole.
(2) To use a swap partition and copy the file there and then implement
some sort of paging scheme to map the contents of the file on disk to
the 64 MB hole that i have.
Are there some other ways to map this 256 MB of data to the 64 MB hole
I have, so that linux uses it own paging and I do not have to introduce
my paging code in between?
Please mail me some scheme / technique that can help me out. My email
id is : reach2anurag_at_gmail_dot_com
-Anurag