mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-15 21:27:18 +03:00
Merge pull request #59 from HarryWeppner/dev
FreeBSD memory (leak) profiling support
This commit is contained in:
commit
9480a23005
2 changed files with 31 additions and 4 deletions
|
|
@ -935,9 +935,12 @@ prof_dump_maps(bool propagate_err)
|
|||
char filename[PATH_MAX + 1];
|
||||
|
||||
cassert(config_prof);
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
malloc_snprintf(filename, sizeof(filename), "/proc/curproc/map");
|
||||
#else
|
||||
malloc_snprintf(filename, sizeof(filename), "/proc/%d/maps",
|
||||
(int)getpid());
|
||||
#endif
|
||||
mfd = open(filename, O_RDONLY);
|
||||
if (mfd != -1) {
|
||||
ssize_t nread;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue