Results 1 to 4 of 4
Anyone have a solution to release cache memory as it is built up by a DMA transfer application? I collect file sizes of ~ 77 MB each hour using 1 ...
- 04-22-2005 #1Just Joined!
- Join Date
- Mar 2005
- Posts
- 6
Release Cache Memory
Anyone have a solution to release cache memory as it is built up by a DMA transfer application? I collect file sizes of ~ 77 MB each hour using 1 GB memory on my system. My data output is interupted and drops data when the OS begins to run low on free memory, which is building up in cache from previous runs. I would think there would be a simple command to release cache after each of my runs, to place in the batch file used for acquisition, but there is nothing I can find. There is shareware for Windows called ReleaseRam that does this for that OS, but nothing that I can find for Linux. Any suggestions?
- 04-25-2005 #2Linux Engineer
- Join Date
- Apr 2005
- Location
- Belgium
- Posts
- 1,429
Well, unfortunately I have the same problem... 1 freaking GB of RAM, and i see the usage climb steadily, until it starts swapping
.
Anyone?** Registered Linux User # 393717 and proud of it
** Check out www.zenwalk.org
** Zenwalk 2.8 - Xfce 4.4 beta 2- 2.6.17.6 kernel = Slack on steroids! **
- 04-25-2005 #3Just Joined!
- Join Date
- Mar 2005
- Posts
- 6
Release Cache Memory
As the C-code that is causing the problem was just recently developed, by
CS students working the problem for me, I found that they did not include
a very important C-call upon completing the acquisition. In addition to
allocateBuffers, one must call releaseBuffers after the last aquisition
completion to tell the OS to do just that. Am trying to incorporate this solution. Description can be found at:
http://www.qnx.com/developers/docs/momentics621_docs/p
hoton/multimedia2/interfaces.html
- 03-24-2011 #4Just Joined!
- Join Date
- Jun 2007
- Location
- Chennai
- Posts
- 1
Hi All,
For releasing cached memory in Linux , you can use the command specified below.
***************
sync; echo 3 > /proc/sys/vm/drop_caches
***************
If you need to execute this command frequently, you can add it as cron job.
Note: Sync is used to synchronize the data in the memory to disk, as some data in disk might be cached in the memory for easy access. Use of sync will prevent any sort of data loss or file system corruption.
Tip: Normally, cached memory will not affect the normal working of the system as when genuine program needs memory, it will use the RAM space used for caching.
Hope this helps. Thank you.
--
With Best Regards,
Abhilash V NairLast edited by oz; 03-24-2011 at 01:59 AM. Reason: Spam Removal



