Does Linux have virtual memory management APIs?
On Windows platform m$ provides a set of APIs that manages virtual memory. I consulted Linux man, but could not find such topics.
I can use malloc to allocate a large block of memory that is larger than system's physical memory. I want to know if there are a *special* set of APIs to manage virtual memory in Linux? I am using FC4 test 3. |
ls /proc/sys/vm
|
I see a list of 0-byte files. What should I do?
|
Look inside them anyway.
All in /proc are not real files on disk. But a way to read or set kernel configuration. E.g. To make your system swap less and increase tendency to keep more processes in RAM, lower the contents of /proc/sys/vm/swappiness: Code:
# Seems to have 0 bytes: |
That's interesting.
But how do I explicitly allocate memory from swapfiles using C/C++ calls? |
Quote:
|
Wow, thanks!
|
Can someone look at my test code and tell me if I am doing things right?
Code:
#include <stdio.h> |
All times are GMT -5. The time now is 08:39 AM. |