diff options
author | Jason Evans <jasone@canonware.com> | 2014-03-29 23:47:08 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2014-03-29 23:47:08 (GMT) |
commit | 9480a230054f6c2f2c816fe887147456bd89409b (patch) | |
tree | 76aecd50dc266c3ce620ae98b8ffea762d78396e /src | |
parent | 57fb8e94ae941ddffc0877714d0539f8999e5ded (diff) | |
parent | c2da2591befa5574cf8c930a5a2cd7f56138658e (diff) | |
download | jemalloc-9480a230054f6c2f2c816fe887147456bd89409b.zip jemalloc-9480a230054f6c2f2c816fe887147456bd89409b.tar.gz jemalloc-9480a230054f6c2f2c816fe887147456bd89409b.tar.bz2 |
Merge pull request #59 from HarryWeppner/dev
FreeBSD memory (leak) profiling support
Diffstat (limited to 'src')
-rw-r--r-- | src/prof.c | 5 |
1 files changed, 4 insertions, 1 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; |