[Webkit-unassigned] [Bug 53361] autorelease pools accumulate memory during automatic testing on Webkit2

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 31 20:48:54 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=53361





--- Comment #7 from Alexey Proskuryakov <ap at webkit.org>  2011-01-31 20:48:54 PST ---
(From update of attachment 80703)
View in context: https://bugs.webkit.org/attachment.cgi?id=80703&action=review

> AppKit creates Autorelease pools at the beginning and end of the user event loop.  When testing Membuster, stress test, etc.  there are no user events so the top pool isn't getting drained.

Should we switch to CFRunLoop now that this more powerful mechanism is used?

> Source/WebKit2/Platform/mac/RunLoopMac.mm:43
> +            NSAutoreleasePool* pool = const_cast<NSAutoreleasePool*>(static_cast<const NSAutoreleasePool*>(CFArrayGetValueAtIndex(autoreleasePoolStack, count - 1)));

Misplaced star - should be "NSAutoreleasePool *" in all three cases.

> Source/WebKit2/Platform/mac/RunLoopMac.mm:45
> +            CFArrayRemoveValueAtIndex(autoreleasePoolStack, count-1);

There should be spaces around "-".

> Source/WebKit2/Platform/mac/RunLoopMac.mm:124
> +        RetainPtr<CFMutableArrayRef> autoreleasePoolStack = CFArrayCreateMutable(kCFAllocatorSystemDefault, 0, 0); // Use system Allocator to avoid retaining the autorelease pool tokens;

I don't understand this comment. It's the last parameter (null callbacks) that avoids retaining array items, so what's the importance of using kCFAllocatorSystemDefault?

Also, it's grammatically incorrect ("Allocator" and a semicolon at the end).

> Source/WebKit2/Platform/mac/RunLoopMac.mm:126
> +        // Install a repeating observer to fire on entry to the run current run loop with a early ordering like -wrapRunLoopWithAutoreleasePoolsOrder.  CFRunLoop gives highest priority to those observers close to minus infinity.

Please don't use two spaces between sentences.

> Source/WebKit2/Platform/mac/RunLoopMac.mm:144
> +        autoreleasePoolStack.clear(); // owned by the observer.

No need for this line - it's the same as RetainPtr destruction.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list