Changes between Initial Version and Version 1 of FastMalloc Glossary


Ignore:
Timestamp:
Mar 26, 2010 10:37:17 AM (14 years ago)
Author:
ggaren@apple.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FastMalloc Glossary

    v1 v1  
     1Here is a glossary of terms used in FastMalloc. Sometimes, more than one term is used for the same thing.
     2
     3'''sizeclass | class'''
     4{{{
     5number from [1, kNumClasses] identifying a size grouping
     60 sizeclass means large allocation
     7objects of the same sizeclass:
     8    have the same true allocation size
     9    are in the same free list
     10}}}
     11
     12'''classindex'''
     13{{{
     14location of 'size' in the sizeclass array
     15classindex values are cached to avoid repeat math
     16}}}
     17
     18
     19'''span | descriptor'''
     20{{{
     21metadata for a contiguous run of pages
     22either a single large allocation or
     23parceled into bytesize(sizeclass) units
     24maintains a free list for those units
     25maintains a total reference count for those units
     26}}}
     27
     28
     29'''pagemap'''
     30{{{
     31[pageID => span] mapping for all pageIDs in the address space
     32more than one pageID can map to the same span
     33}}}
     34
     35
     36'''page'''
     37{{{
     38kPageSize chunk of memory
     39}}}
     40
     41
     42'''pageID'''
     43{{{
     44number from [0, kNumPages] identifying a page
     45pageID * kPageSize = address of page
     46}}}
     47
     48'''object'''
     49{{{
     50item in a free list
     51}}}
     52
     53'''split (verb)'''
     54{{{
     55break a span into two parts (used by memalign)
     56}}}
     57
     58'''carve (verb)'''
     59{{{
     60allocate a span, possibly splitting it (used by pageheap allocation functions)
     61}}}
     62
     63'''pageheap'''
     64{{{
     65central span and page allocator
     66requires locking
     67maintains the pagemap
     68keeps free spanlists for spans
     69}}}
     70
     71'''spanlist'''
     72{{{
     732 linked lists of spans:
     74    mmaped (vm live)
     75    madvised (vm dead)
     76}}}
     77
     78'''threadcache | heap | threadheap'''
     79{{{
     80per-thread free lists for various size classes
     81}}}
     82
     83'''central_cache'''
     84{{{
     85central list for size classes
     86one lock per list
     87all normal-sized allocation originates in the central_cache (but may be cached in a threadcache)
     88}}}
     89