[Webkit-unassigned] [Bug 45186] Use the Windows thread pool instead of an extra thread for FastMalloc scavenging

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 11 07:31:33 PST 2011


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


Adam Roben (aroben) <aroben at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #78526|review?, commit-queue?      |review-
               Flag|                            |




--- Comment #4 from Adam Roben (aroben) <aroben at apple.com>  2011-01-11 07:31:33 PST ---
(From update of attachment 78526)
View in context: https://bugs.webkit.org/attachment.cgi?id=78526&action=review

> Source/JavaScriptCore/wtf/FastMalloc.cpp:1566
> +    while (1) {
> +        if (runScavenge())
> +            continue;
> +
> +        pthread_mutex_lock(&m_scavengeMutex);
> +        m_scavengeThreadActive = false;
> +        // Block until there are enough free committed pages to release back to the system.
> +        pthread_cond_wait(&m_scavengeCondition, &m_scavengeMutex);
> +        m_scavengeThreadActive = true;
> +        pthread_mutex_unlock(&m_scavengeMutex);
> +    }

I think it would be a lot better if we followed the libdispatch implementation. periodicScavenge just performs a single scavenge, then waits for the timer to fire again (or stops the timer if no more scavenging is needed). That way we don't tie up a worker thread while we sleep and block.

-- 
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