diff options
author | David Goldblatt <davidgoldblatt@fb.com> | 2017-08-14 20:32:28 (GMT) |
---|---|---|
committer | David Goldblatt <davidtgoldblatt@gmail.com> | 2017-08-17 00:48:44 (GMT) |
commit | ea91dfa58e11373748f747041c3041f72c9a7658 (patch) | |
tree | 9ef9f2b588bcdf6d9a35d255df323aa2c8f4bf5e /include/jemalloc | |
parent | 9c0549007dcb64f4ff35d37390a9a6a8d3cea880 (diff) | |
download | jemalloc-ea91dfa58e11373748f747041c3041f72c9a7658.zip jemalloc-ea91dfa58e11373748f747041c3041f72c9a7658.tar.gz jemalloc-ea91dfa58e11373748f747041c3041f72c9a7658.tar.bz2 |
Document the ialloc function abbreviations.
In the jemalloc_internal_inlines files, we have a lot of somewhat terse function
names. This commit adds some documentation to aid in translation.
Diffstat (limited to 'include/jemalloc')
-rw-r--r-- | include/jemalloc/internal/cache_bin.h | 2 | ||||
-rw-r--r-- | include/jemalloc/internal/jemalloc_internal_inlines_c.h | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/include/jemalloc/internal/cache_bin.h b/include/jemalloc/internal/cache_bin.h index 85d9de0..9b87439 100644 --- a/include/jemalloc/internal/cache_bin.h +++ b/include/jemalloc/internal/cache_bin.h @@ -17,7 +17,7 @@ /* * The count of the number of cached allocations in a bin. We make this signed * so that negative numbers can encode "invalid" states (e.g. a low water mark - * for a bin that has never been filled). + * of -1 for a cache that has been depleted). */ typedef int32_t cache_bin_sz_t; diff --git a/include/jemalloc/internal/jemalloc_internal_inlines_c.h b/include/jemalloc/internal/jemalloc_internal_inlines_c.h index 7ffce6f..c54fc99 100644 --- a/include/jemalloc/internal/jemalloc_internal_inlines_c.h +++ b/include/jemalloc/internal/jemalloc_internal_inlines_c.h @@ -5,6 +5,24 @@ #include "jemalloc/internal/sz.h" #include "jemalloc/internal/witness.h" +/* + * Translating the names of the 'i' functions: + * Abbreviations used in the first part of the function name (before + * alloc/dalloc) describe what that function accomplishes: + * a: arena (query) + * s: size (query, or sized deallocation) + * e: extent (query) + * p: aligned (allocates) + * vs: size (query, without knowing that the pointer is into the heap) + * r: rallocx implementation + * x: xallocx implementation + * Abbreviations used in the second part of the function name (after + * alloc/dalloc) describe the arguments it takes + * z: whether to return zeroed memory + * t: accepts a tcache_t * parameter + * m: accepts an arena_t * parameter + */ + JEMALLOC_ALWAYS_INLINE arena_t * iaalloc(tsdn_t *tsdn, const void *ptr) { assert(ptr != NULL); |