Update various comments.
This commit is contained in:
parent
2a6f2af6e4
commit
8ad0eacfb3
@ -45,9 +45,10 @@
|
|||||||
* point is implicitly RUN_BFP bits to the left.
|
* point is implicitly RUN_BFP bits to the left.
|
||||||
*
|
*
|
||||||
* Note that it is possible to set RUN_MAX_OVRHD low enough that it cannot be
|
* Note that it is possible to set RUN_MAX_OVRHD low enough that it cannot be
|
||||||
* honored for some/all object sizes, since there is one bit of header overhead
|
* honored for some/all object sizes, since when heap profiling is enabled
|
||||||
* per object (plus a constant). This constraint is relaxed (ignored) for runs
|
* there is one pointer of header overhead per object (plus a constant). This
|
||||||
* that are so small that the per-region overhead is greater than:
|
* constraint is relaxed (ignored) for runs that are so small that the
|
||||||
|
* per-region overhead is greater than:
|
||||||
*
|
*
|
||||||
* (RUN_MAX_OVRHD / (reg_size << (3+RUN_BFP))
|
* (RUN_MAX_OVRHD / (reg_size << (3+RUN_BFP))
|
||||||
*/
|
*/
|
||||||
@ -105,7 +106,7 @@ struct arena_chunk_map_s {
|
|||||||
* Run address (or size) and various flags are stored together. The bit
|
* Run address (or size) and various flags are stored together. The bit
|
||||||
* layout looks like (assuming 32-bit system):
|
* layout looks like (assuming 32-bit system):
|
||||||
*
|
*
|
||||||
* ???????? ???????? ????---- ----dzla
|
* ???????? ???????? ????---- ----dula
|
||||||
*
|
*
|
||||||
* ? : Unallocated: Run address for first/last pages, unset for internal
|
* ? : Unallocated: Run address for first/last pages, unset for internal
|
||||||
* pages.
|
* pages.
|
||||||
@ -113,7 +114,7 @@ struct arena_chunk_map_s {
|
|||||||
* Large: Run size for first page, unset for trailing pages.
|
* Large: Run size for first page, unset for trailing pages.
|
||||||
* - : Unused.
|
* - : Unused.
|
||||||
* d : dirty?
|
* d : dirty?
|
||||||
* z : zeroed?
|
* u : unzeroed?
|
||||||
* l : large?
|
* l : large?
|
||||||
* a : allocated?
|
* a : allocated?
|
||||||
*
|
*
|
||||||
@ -129,30 +130,30 @@ struct arena_chunk_map_s {
|
|||||||
* [dula] : bit unset
|
* [dula] : bit unset
|
||||||
*
|
*
|
||||||
* Unallocated (clean):
|
* Unallocated (clean):
|
||||||
* ssssssss ssssssss ssss---- ----du--
|
* ssssssss ssssssss ssss---- ----du-a
|
||||||
* xxxxxxxx xxxxxxxx xxxx---- -----Uxx
|
* xxxxxxxx xxxxxxxx xxxx---- -----Uxx
|
||||||
* ssssssss ssssssss ssss---- ----dU--
|
* ssssssss ssssssss ssss---- ----dU-a
|
||||||
*
|
*
|
||||||
* Unallocated (dirty):
|
* Unallocated (dirty):
|
||||||
* ssssssss ssssssss ssss---- ----D---
|
* ssssssss ssssssss ssss---- ----D--a
|
||||||
* xxxxxxxx xxxxxxxx xxxx---- ----xxxx
|
* xxxxxxxx xxxxxxxx xxxx---- ----xxxx
|
||||||
* ssssssss ssssssss ssss---- ----D---
|
* ssssssss ssssssss ssss---- ----D--a
|
||||||
*
|
*
|
||||||
* Small:
|
* Small:
|
||||||
* pppppppp pppppppp pppp---- ----d--a
|
* pppppppp pppppppp pppp---- ----d--A
|
||||||
* pppppppp pppppppp pppp---- -------a
|
* pppppppp pppppppp pppp---- -------A
|
||||||
* pppppppp pppppppp pppp---- ----d--a
|
* pppppppp pppppppp pppp---- ----d--A
|
||||||
*
|
*
|
||||||
* Large:
|
* Large:
|
||||||
* ssssssss ssssssss ssss---- ----D-la
|
* ssssssss ssssssss ssss---- ----D-LA
|
||||||
* xxxxxxxx xxxxxxxx xxxx---- ----xxxx
|
* xxxxxxxx xxxxxxxx xxxx---- ----xxxx
|
||||||
* -------- -------- -------- ----D-la
|
* -------- -------- -------- ----D-LA
|
||||||
*
|
*
|
||||||
* Large (sampled, size <= PAGE_SIZE):
|
* Large (sampled, size <= PAGE_SIZE):
|
||||||
* ssssssss ssssssss sssscccc ccccD-la
|
* ssssssss ssssssss sssscccc ccccD-LA
|
||||||
*
|
*
|
||||||
* Large (not sampled, size == PAGE_SIZE):
|
* Large (not sampled, size == PAGE_SIZE):
|
||||||
* ssssssss ssssssss ssss---- ----D-la
|
* ssssssss ssssssss ssss---- ----D-LA
|
||||||
*/
|
*/
|
||||||
size_t bits;
|
size_t bits;
|
||||||
#ifdef JEMALLOC_PROF
|
#ifdef JEMALLOC_PROF
|
||||||
@ -347,45 +348,35 @@ struct arena_s {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* bins is used to store trees of free regions of the following sizes,
|
* bins is used to store trees of free regions of the following sizes,
|
||||||
* assuming a 16-byte quantum, 4 KiB page size, and default
|
* assuming a 64-bit system with 16-byte quantum, 4 KiB page size, and
|
||||||
* JEMALLOC_OPTIONS.
|
* default MALLOC_CONF.
|
||||||
*
|
*
|
||||||
* bins[i] | size |
|
* bins[i] | size |
|
||||||
* --------+--------+
|
* --------+--------+
|
||||||
* 0 | 2 |
|
* 0 | 8 |
|
||||||
* 1 | 4 |
|
|
||||||
* 2 | 8 |
|
|
||||||
* --------+--------+
|
* --------+--------+
|
||||||
* 3 | 16 |
|
* 1 | 16 |
|
||||||
* 4 | 32 |
|
* 2 | 32 |
|
||||||
* 5 | 48 |
|
* 3 | 48 |
|
||||||
* : :
|
* : :
|
||||||
* 8 | 96 |
|
* 6 | 96 |
|
||||||
* 9 | 112 |
|
* 7 | 112 |
|
||||||
* 10 | 128 |
|
* 8 | 128 |
|
||||||
* --------+--------+
|
* --------+--------+
|
||||||
* 11 | 192 |
|
* 9 | 192 |
|
||||||
* 12 | 256 |
|
* 10 | 256 |
|
||||||
* 13 | 320 |
|
* 11 | 320 |
|
||||||
* 14 | 384 |
|
* 12 | 384 |
|
||||||
* 15 | 448 |
|
* 13 | 448 |
|
||||||
* 16 | 512 |
|
* 14 | 512 |
|
||||||
* --------+--------+
|
* --------+--------+
|
||||||
* 17 | 768 |
|
* 15 | 768 |
|
||||||
* 18 | 1024 |
|
* 16 | 1024 |
|
||||||
* 19 | 1280 |
|
* 17 | 1280 |
|
||||||
* : :
|
* : :
|
||||||
* 27 | 3328 |
|
* 25 | 3328 |
|
||||||
* 28 | 3584 |
|
* 26 | 3584 |
|
||||||
* 29 | 3840 |
|
* 27 | 3840 |
|
||||||
* --------+--------+
|
|
||||||
* 30 | 4 KiB |
|
|
||||||
* 31 | 6 KiB |
|
|
||||||
* 33 | 8 KiB |
|
|
||||||
* : :
|
|
||||||
* 43 | 28 KiB |
|
|
||||||
* 44 | 30 KiB |
|
|
||||||
* 45 | 32 KiB |
|
|
||||||
* --------+--------+
|
* --------+--------+
|
||||||
*/
|
*/
|
||||||
arena_bin_t bins[1]; /* Dynamically sized. */
|
arena_bin_t bins[1]; /* Dynamically sized. */
|
||||||
|
@ -421,8 +421,8 @@ malloc_conf_init(void)
|
|||||||
if ((opts = getenv(envname)) != NULL) {
|
if ((opts = getenv(envname)) != NULL) {
|
||||||
/*
|
/*
|
||||||
* Do nothing; opts is already initialized to
|
* Do nothing; opts is already initialized to
|
||||||
* the value of the JEMALLOC_OPTIONS
|
* the value of the MALLOC_CONF environment
|
||||||
* environment variable.
|
* variable.
|
||||||
*/
|
*/
|
||||||
} else {
|
} else {
|
||||||
/* No configuration specified. */
|
/* No configuration specified. */
|
||||||
|
Loading…
Reference in New Issue
Block a user