MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / init

Method init

libCacheSim/dataStructure/sparsepp/spp_dlalloc.h:3599–3613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3597}
3598
3599void malloc_state::init(char* tbase, size_t tsize)
3600{
3601 _seg._base = _least_addr = tbase;
3602 _seg._size = _footprint = _max_footprint = tsize;
3603 _magic = mparams._magic;
3604 _release_checks = SPP_MAX_RELEASE_CHECK_RATE;
3605 _mflags = mparams._default_mflags;
3606 _extp = 0;
3607 _exts = 0;
3608 disable_contiguous();
3609 init_bins();
3610 mchunkptr mn = (mchunkptr)mem2chunk(this)->next_chunk();
3611 init_top(mn, (size_t)((tbase + tsize) - (char*)mn) - top_foot_size());
3612 check_top_chunk(_top);
3613}
3614
3615/* Traversal */
3616#if SPP_MALLOC_INSPECT_ALL

Callers 1

init_user_mstateFunction · 0.45

Calls 3

mem2chunkFunction · 0.85
top_foot_sizeFunction · 0.85
next_chunkMethod · 0.80

Tested by

no test coverage detected