Bug 142235

Summary: bmalloc: Added missing features to the malloc zone introspection API
Product: WebKit Reporter: Geoffrey Garen <ggaren>
Component: New BugsAssignee: Geoffrey Garen <ggaren>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch kling: review+

Description Geoffrey Garen 2015-03-03 14:34:41 PST
bmalloc: Added missing features to the malloc zone introspection API
Comment 1 Geoffrey Garen 2015-03-03 14:36:24 PST
Created attachment 247795 [details]
Patch
Comment 2 WebKit Commit Bot 2015-03-03 14:39:27 PST
Attachment 247795 [details] did not pass style-queue:


ERROR: Source/bmalloc/bmalloc/Zone.cpp:42:  good_size is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/bmalloc/bmalloc/Zone.cpp:60:  force_lock is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/bmalloc/bmalloc/Zone.cpp:64:  force_unlock is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/bmalloc/bmalloc/Zone.cpp:80:  type_mask is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/bmalloc/bmalloc/Zone.cpp:80:  zone_address is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 5 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Geoffrey Garen 2015-03-03 14:41:37 PST
> ERROR: Source/bmalloc/bmalloc/Zone.cpp:42:  good_size is incorrectly named.
> Don't use underscores in your identifier names. 
> [readability/naming/underscores] [4]
> ERROR: Source/bmalloc/bmalloc/Zone.cpp:60:  force_lock is incorrectly named.
> Don't use underscores in your identifier names. 
> [readability/naming/underscores] [4]
> ERROR: Source/bmalloc/bmalloc/Zone.cpp:64:  force_unlock is incorrectly
> named. Don't use underscores in your identifier names. 
> [readability/naming/underscores] [4]
> ERROR: Source/bmalloc/bmalloc/Zone.cpp:80:  type_mask is incorrectly named.
> Don't use underscores in your identifier names. 
> [readability/naming/underscores] [4]
> ERROR: Source/bmalloc/bmalloc/Zone.cpp:80:  zone_address is incorrectly
> named. Don't use underscores in your identifier names. 
> [readability/naming/underscores] [4]

These are to match the callback API.
Comment 4 Andreas Kling 2015-03-03 14:42:42 PST
Comment on attachment 247795 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=247795&action=review

r=me

> Source/bmalloc/ChangeLog:26
> +        Zone class since the can stand alone.

the can stand alone.

> Source/bmalloc/bmalloc/Zone.cpp:71
> +static void statistics(malloc_zone_t*, malloc_statistics_t* statistics)
> +{
> +    memset(statistics, 0, sizeof(malloc_statistics_t));
> +}

I guess we can assume that no one would be annoying enough to call this with statistics=nullptr.
Comment 5 Geoffrey Garen 2015-03-03 14:46:20 PST
Committed r180958: <http://trac.webkit.org/changeset/180958>