Closed GoogleCodeExporter closed 9 years ago
My IDE is vs2005
Original comment by sunbaigu...@gmail.com
on 20 Dec 2012 at 2:31
The windows side of gperftools needs a lot of love. I find it very difficult to
find people with windows experience to offer any help. In other words, lots of
issue submissions but very few actual patch submissions. In case you are
waiting for a quick turn around on this I should advise you that this will not
likely be the case unless you are willing to spend some time on it yourself.
-Dave
Original comment by chapp...@gmail.com
on 23 Dec 2012 at 2:55
"I find it very difficult to find people with windows experience to offer any
help"
I would gladly help. In fact I already wrote code addressing this and I would
highly appreciate if this will be used by many.
I find gperftools as being extremely effective and this part with Windows is a
weakness that can and should be addressed.
Radu
Original comment by ialo...@yalos-solutions.com
on 22 Jan 2013 at 9:30
I've patch that almost works. Here:
https://github.com/alk/gperftools/commit/e85ca01c08575e2af42fd4c98b0db27d9a091ba
b
It's as simple as using MEM_RESET flag of VirtualAlloc.
Unfortunately I've just found that it doesn't always work (tcmalloc_unittest
catches that).
Consider two large malloc requests followed by free()-s of both. Every malloc
will grab memory from OS by TCMalloc_SystemAlloc which calls VirtualAlloc on
windows. And windows seems to allocate those regions one after the other. Which
is normally good. Then when free()-s are called tcmalloc will coalesce those
free regions, so that even larger malloc does not have to ask memory from the
os but is able to reuse large free region.
Unfortunately by coalescing those regions tcmalloc completely forgets that they
were allocated by distinct calls to VirtualAlloc and sadly MEM_RESET refuses to
work if VirtualAlloc call covers more then one area.
So we're back to drawing board a bit.
Perhaps we can consider allocating virtual memory in much bigger chunks from
the OS and then preventing tcmalloc from thinking those areas are adjacent.
Original comment by alkondratenko
on 10 Mar 2013 at 3:48
Original comment by chapp...@gmail.com
on 11 Mar 2013 at 12:58
I think I know good way to fix that. Expect working patch soon.
Original comment by alkondratenko
on 11 Mar 2013 at 4:36
Issue 492 has been merged into this issue.
Original comment by alkondratenko
on 14 Jul 2013 at 3:06
Status update: I do have something that appears to work
(https://github.com/alk/gperftools/tree/wip-windows-unmap).
However I found that chromium fork of tcmalloc actually has a better fix. And
that's something I plan to integrate after 2.1 release.
Original comment by alkondratenko
on 14 Jul 2013 at 3:07
Porting chromium work instead. Not yet working commits are here:
https://github.com/alk/gperftools/tree/wip-chromium-decommit
Original comment by alkondratenko
on 10 Nov 2013 at 2:20
Merged a fix.
Original comment by alkondratenko
on 1 Mar 2014 at 7:30
Original issue reported on code.google.com by
sunbaigu...@gmail.com
on 20 Dec 2012 at 2:27Attachments: