Skip to content

Commit

Permalink
Mask out xhprof for memory allocation tracking
Browse files Browse the repository at this point in the history
Summary:
When xhprof is enabled, it will allocate quite a bit of memory
and this can throw off normal memory allocation statistics.  Mask these
allocations since it is not relevant for measurements.

Test Plan:
xhprof_enable() followed by memory_get_allocation() seeing no
increase in allocation memory.

Reviewers: je

Reviewed By: je

CC: jasont, ps, mwilliams, je

Differential Revision: 349035
  • Loading branch information
ps authored and macvicar committed Nov 29, 2011
1 parent b33e07f commit 690f237
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/runtime/base/memory/memory_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ class MemoryManager {
#ifdef USE_JEMALLOC
// exclude mallocs and frees since construction
if (s_statsEnabled) {
m_mm->m_prevAllocated = int64(*m_mm->m_allocated);
m_mm->m_delta = int64(*m_mm->m_allocated) - int64(*m_mm->m_deallocated);
}
#endif
Expand Down

0 comments on commit 690f237

Please sign in to comment.