[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
memory leak when write in a file (with O_DIRECT flag).
Hi,
I have a small program that take a buffer and copy it in a file.
If (and only if) the flag O_DIRECT is given to the open command, a
memory leak appeares.
The /proc/meminfo file, show the free memory going down each time that
the program is running.
The average of the memory leak is 160 kBytes with a buffer of 80 Meg
Bytes.
The buffer is alligned and mlocked before the write.
The system used: Mandrake: 8.2
XFS: 2.0.0-1 mdk
linux: 2.4.18
What I'm doing wrong ???
Thanks for any help.
Vincent