MCPcopy Create free account
hub / github.com/catboost/catboost / SetMaxSize

Method SetMaxSize

library/cpp/cache/cache.h:659–667  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

657 }
658
659 void SetMaxSize(size_t newSize) {
660 List.SetMaxSize(newSize);
661
662 TItem* removedItem = nullptr;
663 while ((removedItem = List.RemoveIfOverflown())) {
664 EraseFromIndex(removedItem);
665 }
666 Y_ASSERT(Index.size() == List.GetSize());
667 }
668
669 size_t GetMaxSize() const {
670 return List.GetMaxSize();

Callers 1

Y_UNIT_TESTFunction · 0.45

Calls 3

RemoveIfOverflownMethod · 0.45
sizeMethod · 0.45
GetSizeMethod · 0.45

Tested by

no test coverage detected