http://bugs.winehq.org/show_bug.cgi?id=19561
--- Comment #3 from Ron Fischler ronfischler@gmail.com 2009-08-03 23:39:10 --- Dear Dmitry,
I don't know for sure if it is in wineserver, and even if it is I certainly do not know where - I have never looked through WINE code before, and I would not know where to look. However, if we use readfile() without the overlappedRead option the program works fine, and there is no growth in wineserver's heap. When overlappedRead is used with readfile(), winserver's heap grows at a fantastic rate (about 84K bytes with each read, even if only a few bytes are being read each time.)
Additionally, the program source provided in the attachment has been set up with no buffering, and yet readfile() is still returning data in blocks of approximately 400 bytes, so there appears to be a buffering layer of some kind down below that I suspect could be related to the memory leak.
Best Regards, Ron