aboutsummaryrefslogtreecommitdiffstats
path: root/src/prof.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/prof.c')
-rw-r--r--src/prof.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/prof.c b/src/prof.c
index 293684ca..13df641a 100644
--- a/src/prof.c
+++ b/src/prof.c
@@ -978,7 +978,7 @@ prof_dump_flush(bool propagate_err) {
cassert(config_prof);
- err = write(prof_dump_fd, prof_dump_buf, prof_dump_buf_end);
+ err = malloc_write_fd(prof_dump_fd, prof_dump_buf, prof_dump_buf_end);
if (err == -1) {
if (!propagate_err) {
malloc_write("<jemalloc>: write() failed during heap "
@@ -1471,8 +1471,9 @@ prof_dump_maps(bool propagate_err) {
goto label_return;
}
}
- nread = read(mfd, &prof_dump_buf[prof_dump_buf_end],
- PROF_DUMP_BUFSIZE - prof_dump_buf_end);
+ nread = malloc_read_fd(mfd,
+ &prof_dump_buf[prof_dump_buf_end], PROF_DUMP_BUFSIZE
+ - prof_dump_buf_end);
} while (nread > 0);
} else {
ret = true;