Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: tools/memory_watcher/memory_hook.cc

Issue 43082: NO CODE CHANGE (Closed)
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/memory_watcher/memory_hook.h ('k') | tools/memory_watcher/memory_watcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Static class for hooking Win32 API routines. 5 // Static class for hooking Win32 API routines.
6 6
7 // Some notes about how to hook Memory Allocation Routines in Windows. 7 // Some notes about how to hook Memory Allocation Routines in Windows.
8 // 8 //
9 // For our purposes we do not hook the libc routines. There are two 9 // For our purposes we do not hook the libc routines. There are two
10 // reasons for this. First, the libc routines all go through HeapAlloc 10 // reasons for this. First, the libc routines all go through HeapAlloc
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 } 546 }
547 547
548 void MemoryHook::OnUntrack(HANDLE heap, int32 id, int32 size) { 548 void MemoryHook::OnUntrack(HANDLE heap, int32 id, int32 size) {
549 // Don't notify about allocations to our internal heap. 549 // Don't notify about allocations to our internal heap.
550 if (heap == heap_) 550 if (heap == heap_)
551 return; 551 return;
552 552
553 if (watcher_) 553 if (watcher_)
554 watcher_->OnUntrack(heap, id, size); 554 watcher_->OnUntrack(heap, id, size);
555 } 555 }
556
OLDNEW
« no previous file with comments | « tools/memory_watcher/memory_hook.h ('k') | tools/memory_watcher/memory_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698