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

Function mspace_memalign

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

Source from the content-addressed store, hash-verified

3894}
3895
3896SPP_API void* mspace_memalign(mspace msp, size_t alignment, size_t bytes)
3897{
3898 mstate ms = (mstate)msp;
3899 if (!ms->ok_magic())
3900 {
3901 SPP_USAGE_ERROR_ACTION(ms, ms);
3902 return 0;
3903 }
3904 if (alignment <= SPP_MALLOC_ALIGNMENT)
3905 return mspace_malloc(msp, bytes);
3906 return ms->internal_memalign(alignment, bytes);
3907}
3908
3909SPP_API void** mspace_independent_calloc(mspace msp, size_t n_elements,
3910 size_t elem_size, void* chunks[])

Callers

nothing calls this directly

Calls 3

mspace_mallocFunction · 0.85
ok_magicMethod · 0.80
internal_memalignMethod · 0.80

Tested by

no test coverage detected