prof.c (261071) | prof.c (263974) |
---|---|
1#define JEMALLOC_PROF_C_ 2#include "jemalloc/internal/jemalloc_internal.h" 3/******************************************************************************/ 4 5#ifdef JEMALLOC_PROF_LIBUNWIND 6#define UNW_LOCAL_ONLY 7#include <libunwind.h> 8#endif --- 921 unchanged lines hidden (view full) --- 930static bool 931prof_dump_maps(bool propagate_err) 932{ 933 bool ret; 934 int mfd; 935 char filename[PATH_MAX + 1]; 936 937 cassert(config_prof); | 1#define JEMALLOC_PROF_C_ 2#include "jemalloc/internal/jemalloc_internal.h" 3/******************************************************************************/ 4 5#ifdef JEMALLOC_PROF_LIBUNWIND 6#define UNW_LOCAL_ONLY 7#include <libunwind.h> 8#endif --- 921 unchanged lines hidden (view full) --- 930static bool 931prof_dump_maps(bool propagate_err) 932{ 933 bool ret; 934 int mfd; 935 char filename[PATH_MAX + 1]; 936 937 cassert(config_prof); |
938 | 938#ifdef __FreeBSD__ 939 malloc_snprintf(filename, sizeof(filename), "/proc/curproc/map"); 940#else |
939 malloc_snprintf(filename, sizeof(filename), "/proc/%d/maps", 940 (int)getpid()); | 941 malloc_snprintf(filename, sizeof(filename), "/proc/%d/maps", 942 (int)getpid()); |
943#endif |
|
941 mfd = open(filename, O_RDONLY); 942 if (mfd != -1) { 943 ssize_t nread; 944 945 if (prof_dump_write(propagate_err, "\nMAPPED_LIBRARIES:\n") && 946 propagate_err) { 947 ret = true; 948 goto label_return; --- 469 unchanged lines hidden --- | 944 mfd = open(filename, O_RDONLY); 945 if (mfd != -1) { 946 ssize_t nread; 947 948 if (prof_dump_write(propagate_err, "\nMAPPED_LIBRARIES:\n") && 949 propagate_err) { 950 ret = true; 951 goto label_return; --- 469 unchanged lines hidden --- |