Re: fread & system memory
Well, I am sure that this doesn't happen in Windows. I've made a program that uses fread periodically for hours (the data in the file is updated from another program). The fread is called every second, so in 2 hours I have more than 7000 calls of fread() and each one of them reads 8000 Bytes of data! And, I do not have sth like u described. I suppose that this shouldn't happen in Linux neither. Are you sure you don't have any memory leak elsewhere? Post some more code.
:wave:
Re: fread & system memory
Thks, I agree on windows there is no problem : I ran my test program on it and it does not require more memory than the 1Mo buffer allocated.
It seems to be linked to Linux (or Suse ?).
I've made some test to play video with ffplay or kaffeine and have the same result. When playing a 60 Mo video, the memory decrease from 60 Mo !! I think Linux (or Suse) have some system memory cache when reading from a file ...