Re: [webkit-dev] If you like writing memory smashers, you'll love this

2014-12-16 Thread Geoffrey Garen
 As of r177317, FastMalloc can be disabled at runtime. This means that you 
 can use system memory analysis tools like GuardMalloc, MallocScribble, 
 Instruments allocation tracking, leaks, and heap to debug memory issues in 
 WebKit nightly builds, spade builds, and release builds.
 
 Is this in reference to bmalloc?

Yes.

 Instruments allocation tracking, leaks, and heap were supported with 
 TCMalloc-based FastMalloc for quite some time.

I think you’re remembering that TCMalloc supported malloc zone introspection? 
Yes, it did — and bmalloc doesn’t.

But zone introspection isn’t enough to get malloc/free backtraces, which is 
what you need in order to to do leaks analysis and allocation tracking. (And, 
of course, TCMalloc didn’t support scribbling, guard edges, guard malloc, and 
so on.)

Geoff
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] If you like writing memory smashers, you'll love this

2014-12-16 Thread Mark Rowe

 On Dec 16, 2014, at 10:47, Geoffrey Garen gga...@apple.com wrote:
 
 As of r177317, FastMalloc can be disabled at runtime. This means that you 
 can use system memory analysis tools like GuardMalloc, MallocScribble, 
 Instruments allocation tracking, leaks, and heap to debug memory issues in 
 WebKit nightly builds, spade builds, and release builds.
 
 Is this in reference to bmalloc?
 
 Yes.
 
 Instruments allocation tracking, leaks, and heap were supported with 
 TCMalloc-based FastMalloc for quite some time.
 
 I think you’re remembering that TCMalloc supported malloc zone introspection? 
 Yes, it did — and bmalloc doesn’t.
 
 But zone introspection isn’t enough to get malloc/free backtraces, which is 
 what you need in order to to do leaks analysis and allocation tracking. (And, 
 of course, TCMalloc didn’t support scribbling, guard edges, guard malloc, and 
 so on.)

http://trac.webkit.org/changeset/153767 
http://trac.webkit.org/changeset/153767. It’s somewhat academic though since 
bmalloc is what is in use on tip of tree.

Do we intend to move the remaining ports over to bmalloc so we can remove 
TCMalloc from the tree?

- Mark

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] If you like writing memory smashers, you'll love this

2014-12-16 Thread Geoffrey Garen
 But zone introspection isn’t enough to get malloc/free backtraces, which is 
 what you need in order to to do leaks analysis and allocation tracking. 
 (And, of course, TCMalloc didn’t support scribbling, guard edges, guard 
 malloc, and so on.)
 
 http://trac.webkit.org/changeset/153767 
 http://trac.webkit.org/changeset/153767. It’s somewhat academic though 
 since bmalloc is what is in use on tip of tree.

Holy bananas — I totally missed that!

Yeah, the only features new to bmalloc are the debugging flags, then.

 Do we intend to move the remaining ports over to bmalloc so we can remove 
 TCMalloc from the tree?

Yes.

There’s some work to adopt the right APIs for fast access to thread-specific 
data, and virtual memory allocation.

Geoff___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


[webkit-dev] If you like writing memory smashers, you'll love this

2014-12-15 Thread Geoffrey Garen
As of r177317, FastMalloc can be disabled at runtime. This means that you can 
use system memory analysis tools like GuardMalloc, MallocScribble, Instruments 
allocation tracking, leaks, and heap to debug memory issues in WebKit nightly 
builds, spade builds, and release builds.

FastMalloc automatically disables itself in the presence of environment 
variables that enable Malloc debugging APIs. For giggles, you can also manually 
disable FastMalloc by setting the “Malloc” environment variable to “1”.

Happy memory smashing.

Geoff
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] If you like writing memory smashers, you'll love this

2014-12-15 Thread Mark Rowe

 On Dec 15, 2014, at 17:31, Geoffrey Garen gga...@apple.com wrote:
 
 As of r177317, FastMalloc can be disabled at runtime. This means that you can 
 use system memory analysis tools like GuardMalloc, MallocScribble, 
 Instruments allocation tracking, leaks, and heap to debug memory issues in 
 WebKit nightly builds, spade builds, and release builds.

Is this in reference to bmalloc? Instruments allocation tracking, leaks, and 
heap were supported with TCMalloc-based FastMalloc for quite some time.

- Mark

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev