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.
This commit is contained in:
parent
9c0549007d
commit
ea91dfa58e
@ -17,7 +17,7 @@
|
|||||||
/*
|
/*
|
||||||
* The count of the number of cached allocations in a bin. We make this signed
|
* 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
|
* 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;
|
typedef int32_t cache_bin_sz_t;
|
||||||
|
|
||||||
|
@ -5,6 +5,24 @@
|
|||||||
#include "jemalloc/internal/sz.h"
|
#include "jemalloc/internal/sz.h"
|
||||||
#include "jemalloc/internal/witness.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 *
|
JEMALLOC_ALWAYS_INLINE arena_t *
|
||||||
iaalloc(tsdn_t *tsdn, const void *ptr) {
|
iaalloc(tsdn_t *tsdn, const void *ptr) {
|
||||||
assert(ptr != NULL);
|
assert(ptr != NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user