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

Function align_offset

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

the number of bytes to offset an address to align it

Source from the content-addressed store, hash-verified

281
282// the number of bytes to offset an address to align it
283static size_t align_offset(void *p)
284{
285 return (((size_t)p & spp_chunk_align_mask) == 0) ? 0 :
286 ((SPP_MALLOC_ALIGNMENT - ((size_t)p & spp_chunk_align_mask)) & spp_chunk_align_mask);
287}
288
289
290#ifndef SPP_FOOTERS

Callers 5

align_as_chunkFunction · 0.85
top_foot_sizeFunction · 0.85
mmap_allocMethod · 0.85
init_topMethod · 0.85
add_segmentMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected