http://bugs.winehq.org/show_bug.cgi?id=22033
--- Comment #24 from Matt Lewandowsky matt@greenviolet.net 2010-05-04 17:02:41 --- (In reply to comment #23)
LD_PRELOAD is never a solution. :( Adding -lmapmalloc to LDFLAGS is a better solution.
The question is probably currently "Is mapmalloc the best choice on Solaris, since there are a half-dozen mallocs available with the OS, and perhaps even bypassing those would be sane?"
mapmalloc pretty much is malloc with mmap instead of sbrk. I've not found numbers showing how much it improves on the standard malloc (and where it fails in comparison), but I can't imagine it being THAT much faster.
http://developers.sun.com/solaris/articles/multiproc/multiproc.html is probably a good starting point for how the different mallocs work on Solaris.
I'm somewhat partial to mtmalloc, myself, but I've not tested wine with it yet, and I don't know if the heap size would be detrimental.
Perhaps the interim fix could be to document that one may need to include -lmapmalloc in LD_FLAGS on Solaris builds at this time?