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

Method findMemory

src/jrd/TempSpace.cpp:652–673  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

650//
651
652UCHAR* TempSpace::findMemory(offset_t& begin, offset_t end, size_t size) const
653{
654 offset_t local_offset = begin;
655 const offset_t save_begin = begin;
656 const Block* block = findBlock(local_offset);
657
658 while (block && (begin + size <= end))
659 {
660 UCHAR* const mem = block->inMemory(local_offset, size);
661 if (mem)
662 {
663 return mem;
664 }
665
666 begin += block->size - local_offset;
667 local_offset = 0;
668 block = block->next;
669 }
670
671 begin = save_begin;
672 return NULL;
673}
674
675//
676// TempSpace::validate

Callers

nothing calls this directly

Calls 1

inMemoryMethod · 0.45

Tested by

no test coverage detected