diff options
author | Jason Evans <je@fb.com> | 2012-03-06 22:57:45 (GMT) |
---|---|---|
committer | Jason Evans <je@fb.com> | 2012-03-08 00:19:19 (GMT) |
commit | d81e4bdd5c991bd5642c8b859ef1f752b51cd9be (patch) | |
tree | afa22483ea5fc9e1ae5402667eac1e1b5c398b85 /src/chunk_mmap.c | |
parent | 4507f34628dfae26e6b0a6faa13e5f9a49600616 (diff) | |
download | jemalloc-d81e4bdd5c991bd5642c8b859ef1f752b51cd9be.zip jemalloc-d81e4bdd5c991bd5642c8b859ef1f752b51cd9be.tar.gz jemalloc-d81e4bdd5c991bd5642c8b859ef1f752b51cd9be.tar.bz2 |
Implement malloc_vsnprintf().
Implement malloc_vsnprintf() (a subset of vsnprintf(3)) as well as
several other printing functions based on it, so that formatted printing
can be relied upon without concern for inducing a dependency on floating
point runtime support. Replace malloc_write() calls with
malloc_*printf() where doing so simplifies the code.
Add name mangling for library-private symbols in the data and BSS
sections. Adjust CONF_HANDLE_*() macros in malloc_conf_init() to expose
all opt_* variable use to cpp so that proper mangling occurs.
Diffstat (limited to 'src/chunk_mmap.c')
-rw-r--r-- | src/chunk_mmap.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/chunk_mmap.c b/src/chunk_mmap.c index 164e86e..c740928 100644 --- a/src/chunk_mmap.c +++ b/src/chunk_mmap.c @@ -61,9 +61,8 @@ pages_map(void *addr, size_t size, bool noreserve) char buf[BUFERROR_BUF]; buferror(errno, buf, sizeof(buf)); - malloc_write("<jemalloc>: Error in munmap(): "); - malloc_write(buf); - malloc_write("\n"); + malloc_printf("<jemalloc: Error in munmap(): %s\n", + buf); if (opt_abort) abort(); } @@ -83,9 +82,7 @@ pages_unmap(void *addr, size_t size) char buf[BUFERROR_BUF]; buferror(errno, buf, sizeof(buf)); - malloc_write("<jemalloc>: Error in munmap(): "); - malloc_write(buf); - malloc_write("\n"); + malloc_printf("<jemalloc>: Error in munmap(): %s\n", buf); if (opt_abort) abort(); } |