summaryrefslogtreecommitdiffstats
path: root/sandbox/src/win2k_threadpool.h
diff options
context:
space:
mode:
authorerikghill@gmail.com <erikghill@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-26 21:06:35 +0000
committererikghill@gmail.com <erikghill@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-26 21:06:35 +0000
commitd448c32f07686a7060a21943a3634bd156d4ed69 (patch)
treeeb919680f210c9cf6d7a0aaefbdbd8aeb3026188 /sandbox/src/win2k_threadpool.h
parent47ef6148e87b5410135e35afe4259344a2a458e4 (diff)
downloadchromium_src-d448c32f07686a7060a21943a3634bd156d4ed69.zip
chromium_src-d448c32f07686a7060a21943a3634bd156d4ed69.tar.gz
chromium_src-d448c32f07686a7060a21943a3634bd156d4ed69.tar.bz2
Eliminated memory growth issue by removing null objects from a list that was accumulating them. Now, the objects are removed from the list when they are no longer needed, instead of being set to null.BUG=110459TEST=1. Go to any webpage 2. Go to a different webpage 3. Go back to step 1 and repeat many times. Before the fix pool_objects_ in win2k_threadpool grows with each new webpage visited. After the fix pool_objects_.size() is bounded even as new webpages are visited.
Review URL: http://codereview.chromium.org/9243014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119287 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/src/win2k_threadpool.h')
-rw-r--r--sandbox/src/win2k_threadpool.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sandbox/src/win2k_threadpool.h b/sandbox/src/win2k_threadpool.h
index 79152a6..8593fa3 100644
--- a/sandbox/src/win2k_threadpool.h
+++ b/sandbox/src/win2k_threadpool.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -22,20 +22,20 @@ namespace sandbox {
// arises.
//
// This implementation simply thunks to the nice thread pool API of win2k.
-class Win2kThreadPool : public ThreadProvider {
+class Win2kThreadPool : public ThreadProvider {
public:
Win2kThreadPool() {
::InitializeCriticalSection(&lock_);
}
virtual ~Win2kThreadPool();
- virtual bool RegisterWait(const void* client, HANDLE waitable_object,
+ virtual bool RegisterWait(const void* cookie, HANDLE waitable_object,
CrossCallIPCCallback callback,
void* context);
virtual bool UnRegisterWaits(void* cookie);
- // Returns the total number of non-released wait objects associated with
+ // Returns the total number of wait objects associated with
// the thread pool.
size_t OutstandingWaits();