summaryrefslogtreecommitdiffstats
path: root/include/jemalloc
diff options
context:
space:
mode:
authorJason Evans <je@fb.com>2014-12-08 22:40:14 (GMT)
committerJason Evans <je@fb.com>2014-12-09 00:34:04 (GMT)
commite12eaf93dca308a426c182956197b0eeb5f2cff3 (patch)
tree3b0ab8f083abdfcd145b16d092f3d50d1b6df373 /include/jemalloc
parent59cd80e6c6e36c26a880e86f6cde9f71808b256c (diff)
downloadjemalloc-e12eaf93dca308a426c182956197b0eeb5f2cff3.zip
jemalloc-e12eaf93dca308a426c182956197b0eeb5f2cff3.tar.gz
jemalloc-e12eaf93dca308a426c182956197b0eeb5f2cff3.tar.bz2
Style and spelling fixes.
Diffstat (limited to 'include/jemalloc')
-rw-r--r--include/jemalloc/internal/arena.h5
-rw-r--r--include/jemalloc/internal/extent.h2
-rw-r--r--include/jemalloc/internal/hash.h5
-rw-r--r--include/jemalloc/internal/jemalloc_internal.h.in2
-rw-r--r--include/jemalloc/internal/jemalloc_internal_decls.h2
-rw-r--r--include/jemalloc/internal/jemalloc_internal_defs.h.in14
-rw-r--r--include/jemalloc/internal/ql.h4
-rw-r--r--include/jemalloc/internal/qr.h6
-rw-r--r--include/jemalloc/internal/rb.h4
-rw-r--r--include/jemalloc/internal/tcache.h2
-rw-r--r--include/jemalloc/internal/util.h6
11 files changed, 25 insertions, 27 deletions
diff --git a/include/jemalloc/internal/arena.h b/include/jemalloc/internal/arena.h
index a42522d..1e19023 100644
--- a/include/jemalloc/internal/arena.h
+++ b/include/jemalloc/internal/arena.h
@@ -263,8 +263,7 @@ struct arena_s {
/*
* There are three classes of arena operations from a locking
* perspective:
- * 1) Thread asssignment (modifies nthreads) is protected by
- * arenas_lock.
+ * 1) Thread assignment (modifies nthreads) is protected by arenas_lock.
* 2) Bin-related operations are protected by bin locks.
* 3) Chunk- and run-related operations are protected by this mutex.
*/
@@ -314,7 +313,7 @@ struct arena_s {
arena_chunk_miscelms_t runs_dirty;
/*
- * user-configureable chunk allocation and deallocation functions.
+ * User-configurable chunk allocation and deallocation functions.
*/
chunk_alloc_t *chunk_alloc;
chunk_dalloc_t *chunk_dalloc;
diff --git a/include/jemalloc/internal/extent.h b/include/jemalloc/internal/extent.h
index 5b00076..cbfc20a 100644
--- a/include/jemalloc/internal/extent.h
+++ b/include/jemalloc/internal/extent.h
@@ -24,7 +24,7 @@ struct extent_node_s {
/* Total region size. */
size_t size;
- /* Arena from which this extent came, if any */
+ /* Arena from which this extent came, if any. */
arena_t *arena;
/* True if zero-filled; used by chunk recycling code. */
diff --git a/include/jemalloc/internal/hash.h b/include/jemalloc/internal/hash.h
index a43bbbe..bcead33 100644
--- a/include/jemalloc/internal/hash.h
+++ b/include/jemalloc/internal/hash.h
@@ -35,13 +35,14 @@ JEMALLOC_INLINE uint32_t
hash_rotl_32(uint32_t x, int8_t r)
{
- return (x << r) | (x >> (32 - r));
+ return ((x << r) | (x >> (32 - r)));
}
JEMALLOC_INLINE uint64_t
hash_rotl_64(uint64_t x, int8_t r)
{
- return (x << r) | (x >> (64 - r));
+
+ return ((x << r) | (x >> (64 - r)));
}
JEMALLOC_INLINE uint32_t
diff --git a/include/jemalloc/internal/jemalloc_internal.h.in b/include/jemalloc/internal/jemalloc_internal.h.in
index bf10617..9bd501c 100644
--- a/include/jemalloc/internal/jemalloc_internal.h.in
+++ b/include/jemalloc/internal/jemalloc_internal.h.in
@@ -302,7 +302,7 @@ typedef unsigned index_t;
#define ALIGNMENT_CEILING(s, alignment) \
(((s) + (alignment - 1)) & (-(alignment)))
-/* Declare a variable length array */
+/* Declare a variable-length array. */
#if __STDC_VERSION__ < 199901L
# ifdef _MSC_VER
# include <malloc.h>
diff --git a/include/jemalloc/internal/jemalloc_internal_decls.h b/include/jemalloc/internal/jemalloc_internal_decls.h
index fa59040..fb2effb 100644
--- a/include/jemalloc/internal/jemalloc_internal_decls.h
+++ b/include/jemalloc/internal/jemalloc_internal_decls.h
@@ -50,7 +50,7 @@ typedef intptr_t ssize_t;
# define PATH_MAX 1024
# define STDERR_FILENO 2
# define __func__ __FUNCTION__
-/* Disable warnings about deprecated system functions */
+/* Disable warnings about deprecated system functions. */
# pragma warning(disable: 4996)
#else
# include <unistd.h>
diff --git a/include/jemalloc/internal/jemalloc_internal_defs.h.in b/include/jemalloc/internal/jemalloc_internal_defs.h.in
index 2923e83..e172c66 100644
--- a/include/jemalloc/internal/jemalloc_internal_defs.h.in
+++ b/include/jemalloc/internal/jemalloc_internal_defs.h.in
@@ -38,7 +38,7 @@
* Defined if __sync_add_and_fetch(uint32_t *, uint32_t) and
* __sync_sub_and_fetch(uint32_t *, uint32_t) are available, despite
* __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 not being defined (which means the
- * functions are defined in libgcc instead of being inlines)
+ * functions are defined in libgcc instead of being inlines).
*/
#undef JE_FORCE_SYNC_COMPARE_AND_SWAP_4
@@ -46,7 +46,7 @@
* Defined if __sync_add_and_fetch(uint64_t *, uint64_t) and
* __sync_sub_and_fetch(uint64_t *, uint64_t) are available, despite
* __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 not being defined (which means the
- * functions are defined in libgcc instead of being inlines)
+ * functions are defined in libgcc instead of being inlines).
*/
#undef JE_FORCE_SYNC_COMPARE_AND_SWAP_8
@@ -201,9 +201,7 @@
#undef JEMALLOC_PURGE_MADVISE_DONTNEED
#undef JEMALLOC_PURGE_MADVISE_FREE
-/*
- * Define if operating system has alloca.h header.
- */
+/* Define if operating system has alloca.h header. */
#undef JEMALLOC_HAS_ALLOCA_H
/* C99 restrict keyword supported. */
@@ -221,13 +219,13 @@
/* sizeof(intmax_t) == 2^LG_SIZEOF_INTMAX_T. */
#undef LG_SIZEOF_INTMAX_T
-/* glibc malloc hooks (__malloc_hook, __realloc_hook, __free_hook) */
+/* glibc malloc hooks (__malloc_hook, __realloc_hook, __free_hook). */
#undef JEMALLOC_GLIBC_MALLOC_HOOK
-/* glibc memalign hook */
+/* glibc memalign hook. */
#undef JEMALLOC_GLIBC_MEMALIGN_HOOK
-/* adaptive mutex support in pthreads */
+/* Adaptive mutex support in pthreads. */
#undef JEMALLOC_HAVE_PTHREAD_MUTEX_ADAPTIVE_NP
#endif /* JEMALLOC_INTERNAL_DEFS_H_ */
diff --git a/include/jemalloc/internal/ql.h b/include/jemalloc/internal/ql.h
index f70c5f6..1834bb8 100644
--- a/include/jemalloc/internal/ql.h
+++ b/include/jemalloc/internal/ql.h
@@ -1,6 +1,4 @@
-/*
- * List definitions.
- */
+/* List definitions. */
#define ql_head(a_type) \
struct { \
a_type *qlh_first; \
diff --git a/include/jemalloc/internal/qr.h b/include/jemalloc/internal/qr.h
index 602944b..0fbaec2 100644
--- a/include/jemalloc/internal/qr.h
+++ b/include/jemalloc/internal/qr.h
@@ -40,8 +40,10 @@ struct { \
(a_qr_b)->a_field.qre_prev = t; \
} while (0)
-/* qr_meld() and qr_split() are functionally equivalent, so there's no need to
- * have two copies of the code. */
+/*
+ * qr_meld() and qr_split() are functionally equivalent, so there's no need to
+ * have two copies of the code.
+ */
#define qr_split(a_qr_a, a_qr_b, a_field) \
qr_meld((a_qr_a), (a_qr_b), a_field)
diff --git a/include/jemalloc/internal/rb.h b/include/jemalloc/internal/rb.h
index 64fab89..2ca8e59 100644
--- a/include/jemalloc/internal/rb.h
+++ b/include/jemalloc/internal/rb.h
@@ -200,7 +200,7 @@ a_prefix##reverse_iter(a_rbt_type *rbtree, a_type *start, \
* int (a_cmp *)(a_type *a_node, a_type *a_other);
* ^^^^^^
* or a_key
- * Interpretation of comparision function return values:
+ * Interpretation of comparison function return values:
* -1 : a_node < a_other
* 0 : a_node == a_other
* 1 : a_node > a_other
@@ -693,7 +693,7 @@ a_prefix##remove(a_rbt_type *rbtree, a_type *node) { \
rbtn_rotate_left(a_type, a_field, pathp->node, \
tnode); \
/* Balance restored, but rotation modified */\
- /* subree root, which may actually be the tree */\
+ /* subtree root, which may actually be the tree */\
/* root. */\
if (pathp == path) { \
/* Set root. */ \
diff --git a/include/jemalloc/internal/tcache.h b/include/jemalloc/internal/tcache.h
index fe9c47e..3a3fd49 100644
--- a/include/jemalloc/internal/tcache.h
+++ b/include/jemalloc/internal/tcache.h
@@ -69,7 +69,7 @@ struct tcache_bin_s {
struct tcache_s {
ql_elm(tcache_t) link; /* Used for aggregating stats. */
- uint64_t prof_accumbytes;/* Cleared after arena_prof_accum() */
+ uint64_t prof_accumbytes;/* Cleared after arena_prof_accum(). */
arena_t *arena; /* This thread's arena. */
unsigned ev_cnt; /* Event count since incremental GC. */
index_t next_gc_bin; /* Next bin to GC. */
diff --git a/include/jemalloc/internal/util.h b/include/jemalloc/internal/util.h
index 5af6832..b2b4ab7 100644
--- a/include/jemalloc/internal/util.h
+++ b/include/jemalloc/internal/util.h
@@ -127,7 +127,7 @@ int get_errno(void);
#if (defined(JEMALLOC_ENABLE_INLINE) || defined(JEMALLOC_UTIL_C_))
-/* Sanity check: */
+/* Sanity check. */
#if !defined(JEMALLOC_INTERNAL_FFSL) || !defined(JEMALLOC_INTERNAL_FFS)
# error Both JEMALLOC_INTERNAL_FFSL && JEMALLOC_INTERNAL_FFS should have been defined by configure
#endif
@@ -231,7 +231,7 @@ lg_floor(size_t x)
}
#endif
-/* Sets error code */
+/* Set error code. */
JEMALLOC_INLINE void
set_errno(int errnum)
{
@@ -243,7 +243,7 @@ set_errno(int errnum)
#endif
}
-/* Get last error code */
+/* Get last error code. */
JEMALLOC_INLINE int
get_errno(void)
{