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

Function chunk2mem

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

conversion from malloc headers to user pointers, and back

Source from the content-addressed store, hash-verified

774
775// conversion from malloc headers to user pointers, and back
776static SPP_FORCEINLINE void *chunk2mem(const void *p) { return (void *)((char *)p + 2 * sizeof(size_t)); }
777static SPP_FORCEINLINE mchunkptr mem2chunk(const void *mem) { return (mchunkptr)((char *)mem - 2 * sizeof(size_t)); }
778
779// chunk associated with aligned address A

Callers 15

align_as_chunkFunction · 0.85
top_foot_sizeFunction · 0.85
do_check_any_chunkMethod · 0.85
do_check_top_chunkMethod · 0.85
do_check_free_chunkMethod · 0.85
mmap_allocMethod · 0.85
init_topMethod · 0.85
prepend_allocMethod · 0.85
add_segmentMethod · 0.85
sys_allocMethod · 0.85
tmalloc_largeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected