MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / decrUsage

Method decrUsage

src/common/classes/alloc.cpp:1976–1991  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1974}
1975
1976void DoubleLinkedList::decrUsage(MemMediumHunk* hunk, MemPool* pool)
1977{
1978 if (hunk->decrUsage())
1979 {
1980 if (candidateForFree && (candidateForFree != hunk) && candidateForFree->isFree())
1981 {
1982 candidateForFree->unlinkBlocks();
1983 SemiDoubleLink::remove(candidateForFree);
1984
1985 fb_assert(pool);
1986 MemPool::releaseExtent(false, candidateForFree, candidateForFree->length, pool);
1987 }
1988
1989 candidateForFree = hunk;
1990 }
1991}
1992
1993
1994template <class ListBuilder, class Limits>

Callers 1

newBlockMethod · 0.45

Calls 3

removeFunction · 0.85
isFreeMethod · 0.80
unlinkBlocksMethod · 0.80

Tested by

no test coverage detected