Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/stdlib rename umax2s->size_t2s function per apb's r...



details:   https://anonhg.NetBSD.org/src/rev/c4e359dc2c5f
branches:  trunk
changeset: 778302:c4e359dc2c5f
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Mar 21 14:32:22 2012 +0000

description:
rename umax2s->size_t2s function per apb's request.

diffstat:

 lib/libc/stdlib/jemalloc.c |  24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diffs (67 lines):

diff -r 113445f73acf -r c4e359dc2c5f lib/libc/stdlib/jemalloc.c
--- a/lib/libc/stdlib/jemalloc.c        Wed Mar 21 14:28:32 2012 +0000
+++ b/lib/libc/stdlib/jemalloc.c        Wed Mar 21 14:32:22 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: jemalloc.c,v 1.27 2012/03/21 10:10:36 matt Exp $       */
+/*     $NetBSD: jemalloc.c,v 1.28 2012/03/21 14:32:22 christos Exp $   */
 
 /*-
  * Copyright (C) 2006,2007 Jason Evans <jasone%FreeBSD.org@localhost>.
@@ -118,7 +118,7 @@
 
 #include <sys/cdefs.h>
 /* __FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.147 2007/06/15 22:00:16 jasone Exp $"); */ 
-__RCSID("$NetBSD: jemalloc.c,v 1.27 2012/03/21 10:10:36 matt Exp $");
+__RCSID("$NetBSD: jemalloc.c,v 1.28 2012/03/21 14:32:22 christos Exp $");
 
 #ifdef __FreeBSD__
 #include "libc_private.h"
@@ -816,7 +816,7 @@
 #ifdef MALLOC_STATS
 static void    malloc_printf(const char *format, ...);
 #endif
-static char    *umax2s(size_t x, char *s);
+static char    *size_t2s(size_t x, char *s);
 static bool    base_pages_alloc(size_t minsize);
 static void    *base_alloc(size_t size);
 static chunk_node_t *base_chunk_node_alloc(void);
@@ -978,13 +978,13 @@
 
 /*
  * We don't want to depend on vsnprintf() for production builds, since that can
- * cause unnecessary bloat for static binaries.  umax2s() provides minimal
+ * cause unnecessary bloat for static binaries.  size_t2s() provides minimal
  * integer printing functionality, so that malloc_printf() use can be limited to
  * MALLOC_STATS code.
  */
 #define UMAX2S_BUFSIZE 21
 static char *
-umax2s(size_t x, char *s)
+size_t2s(size_t x, char *s)
 {
        unsigned i;
 
@@ -3218,16 +3218,16 @@
                    opt_xmalloc ? "X" : "x",
                    opt_zero ? "Z\n" : "z\n");
 
-               _malloc_message("CPUs: ", umax2s(ncpus, s), "\n", "");
-               _malloc_message("Max arenas: ", umax2s(narenas, s), "\n", "");
-               _malloc_message("Pointer size: ", umax2s(sizeof(void *), s),
+               _malloc_message("CPUs: ", size_t2s(ncpus, s), "\n", "");
+               _malloc_message("Max arenas: ", size_t2s(narenas, s), "\n", "");
+               _malloc_message("Pointer size: ", size_t2s(sizeof(void *), s),
                    "\n", "");
-               _malloc_message("Quantum size: ", umax2s(quantum, s), "\n", "");
-               _malloc_message("Max small size: ", umax2s(small_max, s), "\n",
+               _malloc_message("Quantum size: ", size_t2s(quantum, s), "\n", "");
+               _malloc_message("Max small size: ", size_t2s(small_max, s), "\n",
                    "");
 
-               _malloc_message("Chunk size: ", umax2s(chunksize, s), "", "");
-               _malloc_message(" (2^", umax2s((size_t)opt_chunk_2pow, s),
+               _malloc_message("Chunk size: ", size_t2s(chunksize, s), "", "");
+               _malloc_message(" (2^", size_t2s((size_t)opt_chunk_2pow, s),
                    ")\n", "");
 
 #ifdef MALLOC_STATS



Home | Main Index | Thread Index | Old Index