MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / segment_holding

Function segment_holding

dlmalloc/dlmalloc.c:2142–2150  ·  view source on GitHub ↗

Return segment holding given address */

Source from the content-addressed store, hash-verified

2140
2141/* Return segment holding given address */
2142static msegmentptr segment_holding(mstate m, char* addr) {
2143 msegmentptr sp = &m->seg;
2144 for (;;) {
2145 if (addr >= sp->base && addr < sp->base + sp->size)
2146 return sp;
2147 if ((sp = sp->next) == 0)
2148 return 0;
2149 }
2150}
2151
2152/* Return true if segment contains a segment link */
2153static int has_segment_link(mstate m, msegmentptr ss) {

Callers 4

do_check_top_chunkFunction · 0.85
add_segmentFunction · 0.85
sys_allocFunction · 0.85
sys_trimFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected