LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   RAM access using a c program (https://www.linuxquestions.org/questions/linux-newbie-8/ram-access-using-a-c-program-835612/)

qrohit 10-01-2010 07:41 AM

RAM access using a c program
 
hello and Namastey!
i am developping a tool for freeing up unused ram in linux ubuntu.
i am finding something through which i would be able to access the ram of my pc using my c program.
please tell me if there is a way to do so.
is there any system call available? or i have to do programming at kernel level? (i mean do i have to compile the whole kernel?)

neonsignal 10-01-2010 09:34 AM

You can examine memory using the /proc/kcore handle, assuming that you don't care about the physical memory address.

However, you will find that Linux already makes use of as much RAM as it can; if it isn't in use by applications, it will be used for disk caching.

qrohit 10-04-2010 06:33 AM

thank you very much..
i read the utilities provided by /proc


All times are GMT -5. The time now is 07:39 PM.