wiki:FastMalloc Glossary

Here is a glossary of terms used in FastMalloc. Sometimes, more than one term is used for the same thing.

sizeclass | class

number from [1, kNumClasses] identifying a size grouping
0 sizeclass means large allocation
objects of the same sizeclass:
    have the same true allocation size
    are in the same free list


location of 'size' in the sizeclass array
classindex values are cached to avoid repeat math

span | descriptor

metadata for a contiguous run of pages
either a single large allocation or
parceled into bytesize(sizeclass) units
maintains a free list for those units
maintains a total reference count for those units


[pageID => span] mapping for all pageIDs in the address space
more than one pageID can map to the same span


kPageSize chunk of memory


number from [0, kNumPages] identifying a page
pageID * kPageSize = address of page


item in a free list

split (verb)

break a span into two parts (used by memalign)

carve (verb)

allocate a span, possibly splitting it (used by pageheap allocation functions)


central span and page allocator
requires locking
maintains the pagemap
keeps free spanlists for spans


2 linked lists of spans:
    mmaped (vm live)
    madvised (vm dead)

threadcache | heap | threadheap

per-thread free lists for various size classes


central list for size classes
one lock per list
all normal-sized allocation originates in the central_cache (but may be cached in a threadcache)
Last modified 7 years ago Last modified on Mar 26, 2010 10:37:17 AM