Commit Graph

11 Commits

Author SHA1 Message Date
Aliaksei Kandratsenka
187b31e952 amputate heap checker 2024-09-25 18:34:09 -04:00
Ishant Goyal
addf751420 Added support to configure lower bound on per-thread cache size
[alkondratenko@gmail.com: removed spurious new line at thread_cache.h]
Signed-off-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
2024-06-04 12:11:01 -04:00
Aliaksey Kandratsenka
e78238d94d reworked heap leak checker for more portability
In most practical terms, this expands "official" heap leak checker
support to Linux/arm64 and Linux/riscv (mips-en and legacy arm are
likely to work & pass tests too now).

The code is now explicitly Linux-only, without trying to pretend
otherwise. Main goal of this change is to finally amputate
linux_syscall_support.h, which we historically had trouble maintaining
well. Biggest challenge was around thread listing facility which uses
clone (ptrace explicitly fails between threads) and that causes
difficulties around parent and child tasks sharing
errno. linux_syscall_support stuff had special feature to "redirect"
errno accesses. But it caused us for more trouble. We switched to
regular syscalls, and errno stamping avoidance is now simply via
careful programming.

A number of other cleanups is made (such us thread finding codes in
procfs which clearly was built for some ages old and odd kernels).

sem_post/sem_wait synchronization was previously potentially prone to
deadlock (if parent died at bad time). We now use pipe pair for this
synchronization and it is fully robust.
2023-07-02 22:30:00 -04:00
Ben Dang
836c4f29a5
Update documentation for heap_checker.html
Make it clear that the static methods used require the "namespace", `HeapLeakChecker::`.
2018-04-13 10:54:05 -07:00
Todd Lipcon
db98aac55a Add a central free list for kMaxPages-sized spans
Previously, the central free list with index '0' was always unused,
since freelist index 'i' tracked spans of length 'i' and there are no
spans of length 0. This meant that there was no freelist for spans of
length 'kMaxPages'. In the default configuration, this corresponds to
1MB, which is a relatively common allocation size in a lot of
applications.

This changes the free list indexing so that index 'i' tracks spans of
length 'i + 1', meaning that free list index 0 is now used and
freelist[kMaxPages - 1] tracks allocations of kMaxPages size (1MB by
default).

This also fixes the stats output to indicate '>128' for the large spans
stats rather than the incorrect '>255' which must have referred to a
historical value of kMaxPages.

No new tests are added since this code is covered by existing tests.
2018-03-17 09:46:28 -07:00
Todd Lipcon
59c77be0fa Update docs for central page heap to reflect tree 2018-02-25 15:25:16 -08:00
Ishan Arora
a42e44738a typo in docs/tcmalloc.html 2018-01-09 01:35:43 +05:30
Kim Gräsman
163224d8af Document HEAPPROFILESIGNAL environment variable 2017-05-29 15:04:00 -07:00
Kirill Müller
664210ead8 doc -> docs, with symlink 2016-11-19 15:04:43 -08:00
csilvers
ddbf2f027f Now that we've uploaded the full source, including the doc/ directory, we can get rid of docs/
git-svn-id: http://gperftools.googlecode.com/svn/trunk@27 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2007-03-22 05:03:28 +00:00
trowbridge.jon
66737d1c25 Import of HTML documentation from SourceForge.
git-svn-id: http://gperftools.googlecode.com/svn/trunk@3 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
2006-12-28 22:39:33 +00:00