[Bug 30839] BSTR cache corrupts most of cached BSTR entries

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Jun 22 07:57:13 CDT 2012


http://bugs.winehq.org/show_bug.cgi?id=30839

--- Comment #14 from Jacek Caban <jacek at codeweavers.com> 2012-06-22 07:57:13 CDT ---
(In reply to comment #13)
> (In reply to comment #10)
> > I've attached a patch that may help.
> 
> This patch makes the test consistently pass, and with that patch the
> application I worry about works as well.

Great.

> > Although it's technically good, I don't it in Wine yet.
> 
> What is the reason for that? What are the drawbacks if that patch is committed?

This patch keeps a buffer in a bucked for smaller buffers if accurate bucked is
full. This was we keep it alive for longer time, but at cost of wasted memory.
We already do similar trick when we look for a buffer in cache (if we don't
have matching buffer, we try to use a bit bigger one). If we keep extending the
cache implementation this way, we risk a serious waste of memory, which I'd
much rather avoid in such a common memory allocator. So, with this patch, the
semantic is preserved, but it needs more thoughts.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list