diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2016-10-03 10:33:37 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2016-10-03 16:52:37 +0000 |
commit | 45b821c4c984467962129cd70f2ddd3608f7c9a6 (patch) | |
tree | 883b4f7dcae3eea096d3aefee653662f4b427cff /searchlib | |
parent | 6a0ea2d5fce1967927cf1f4f319fb0209ac2eb1e (diff) |
Checkpoint after buil success.
Diffstat (limited to 'searchlib')
15 files changed, 69 insertions, 99 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/loadednumericvalue.cpp b/searchlib/src/vespa/searchlib/attribute/loadednumericvalue.cpp index bea214ed8bd..1fb2434167f 100644 --- a/searchlib/src/vespa/searchlib/attribute/loadednumericvalue.cpp +++ b/searchlib/src/vespa/searchlib/attribute/loadednumericvalue.cpp @@ -12,9 +12,7 @@ namespace attribute template <typename T> void -sortLoadedByValue(SequentialReadModifyWriteVector<LoadedNumericValue<T>, - vespalib::DefaultAlloc> & - loaded) +sortLoadedByValue(SequentialReadModifyWriteVector<LoadedNumericValue<T>> & loaded) { ShiftBasedRadixSorter<LoadedNumericValue<T>, typename LoadedNumericValue<T>::ValueRadix, @@ -29,9 +27,7 @@ sortLoadedByValue(SequentialReadModifyWriteVector<LoadedNumericValue<T>, template <typename T> void -sortLoadedByDocId(SequentialReadModifyWriteVector<LoadedNumericValue<T>, - vespalib::DefaultAlloc> & - loaded) +sortLoadedByDocId(SequentialReadModifyWriteVector<LoadedNumericValue<T>> & loaded) { ShiftBasedRadixSorter<LoadedNumericValue<T>, typename LoadedNumericValue<T>::DocRadix, @@ -46,75 +42,51 @@ sortLoadedByDocId(SequentialReadModifyWriteVector<LoadedNumericValue<T>, template void -sortLoadedByValue(SequentialReadModifyWriteVector<LoadedNumericValue<int8_t>, - vespalib::DefaultAlloc> & - loaded); +sortLoadedByValue(SequentialReadModifyWriteVector<LoadedNumericValue<int8_t>> & loaded); template void -sortLoadedByValue(SequentialReadModifyWriteVector<LoadedNumericValue<int16_t>, - vespalib::DefaultAlloc> & - loaded); +sortLoadedByValue(SequentialReadModifyWriteVector<LoadedNumericValue<int16_t>> & loaded); template void -sortLoadedByValue(SequentialReadModifyWriteVector<LoadedNumericValue<int32_t>, - vespalib::DefaultAlloc> & - loaded); +sortLoadedByValue(SequentialReadModifyWriteVector<LoadedNumericValue<int32_t>> & loaded); template void -sortLoadedByValue(SequentialReadModifyWriteVector<LoadedNumericValue<int64_t>, - vespalib::DefaultAlloc> & - loaded); +sortLoadedByValue(SequentialReadModifyWriteVector<LoadedNumericValue<int64_t>> & loaded); template void -sortLoadedByValue(SequentialReadModifyWriteVector<LoadedNumericValue<float>, - vespalib::DefaultAlloc> & - loaded); +sortLoadedByValue(SequentialReadModifyWriteVector<LoadedNumericValue<float>> & loaded); template void -sortLoadedByValue(SequentialReadModifyWriteVector<LoadedNumericValue<double>, - vespalib::DefaultAlloc> & - loaded); +sortLoadedByValue(SequentialReadModifyWriteVector<LoadedNumericValue<double>> & loaded); template void -sortLoadedByDocId(SequentialReadModifyWriteVector<LoadedNumericValue<int8_t>, - vespalib::DefaultAlloc> & - loaded); +sortLoadedByDocId(SequentialReadModifyWriteVector<LoadedNumericValue<int8_t>> & loaded); template void -sortLoadedByDocId(SequentialReadModifyWriteVector<LoadedNumericValue<int16_t>, - vespalib::DefaultAlloc> & - loaded); +sortLoadedByDocId(SequentialReadModifyWriteVector<LoadedNumericValue<int16_t>> & loaded); template void -sortLoadedByDocId(SequentialReadModifyWriteVector<LoadedNumericValue<int32_t>, - vespalib::DefaultAlloc> & - loaded); +sortLoadedByDocId(SequentialReadModifyWriteVector<LoadedNumericValue<int32_t>> & loaded); template void -sortLoadedByDocId(SequentialReadModifyWriteVector<LoadedNumericValue<int64_t>, - vespalib::DefaultAlloc> & - loaded); +sortLoadedByDocId(SequentialReadModifyWriteVector<LoadedNumericValue<int64_t>> & loaded); template void -sortLoadedByDocId(SequentialReadModifyWriteVector<LoadedNumericValue<float>, - vespalib::DefaultAlloc> & - loaded); +sortLoadedByDocId(SequentialReadModifyWriteVector<LoadedNumericValue<float>> & loaded); template void -sortLoadedByDocId(SequentialReadModifyWriteVector<LoadedNumericValue<double>, - vespalib::DefaultAlloc> & - loaded); +sortLoadedByDocId(SequentialReadModifyWriteVector<LoadedNumericValue<double>> & loaded); diff --git a/searchlib/src/vespa/searchlib/btree/bufferstate.cpp b/searchlib/src/vespa/searchlib/btree/bufferstate.cpp index d0dd62fec4b..36e63300034 100644 --- a/searchlib/src/vespa/searchlib/btree/bufferstate.cpp +++ b/searchlib/src/vespa/searchlib/btree/bufferstate.cpp @@ -3,12 +3,12 @@ #include "bufferstate.h" #include <limits> -namespace search -{ +using vespalib::DefaultAlloc; +using vespalib::alloc::Alloc; -namespace btree -{ +namespace search { +namespace btree { BufferTypeBase::BufferTypeBase(uint32_t clusterSize, uint32_t minClusters, @@ -149,7 +149,7 @@ BufferState::onActive(uint32_t bufferId, uint32_t typeId, void *&buffer) { assert(buffer == NULL); - assert(_buffer->get() == NULL); + assert(_buffer.get() == NULL); assert(_state == FREE); assert(_typeHandler == NULL); assert(_allocElems == 0); @@ -169,7 +169,7 @@ BufferState::onActive(uint32_t bufferId, uint32_t typeId, size_t allocSize = allocClusters * typeHandler->getClusterSize(); assert(allocSize >= initialSizeNeeded + sizeNeeded); _buffer.create(allocSize * typeHandler->elementSize()).swap(_buffer); - buffer = _buffer->get(); + buffer = _buffer.get(); typeHandler->onActive(&_usedElems); assert(buffer != NULL); _allocElems = allocSize; @@ -210,13 +210,13 @@ BufferState::onHold(void) void BufferState::onFree(void *&buffer) { - assert(buffer == _buffer->get()); + assert(buffer == _buffer.get()); assert(_state == HOLD); assert(_typeHandler != NULL); assert(_deadElems <= _usedElems); assert(_holdElems == _usedElems - _deadElems); _typeHandler->destroyElements(buffer, _usedElems); - _buffer.create().swap(_buffer); + DefaultAlloc::create().swap(_buffer); _typeHandler->onFree(_usedElems); buffer = NULL; _usedElems = 0; @@ -337,7 +337,7 @@ BufferState::fallbackResize(uint64_t newSize, holdBuffer.swap(_buffer); std::atomic_thread_fence(std::memory_order_release); _buffer = std::move(newBuffer); - buffer = _buffer->get(); + buffer = _buffer.get(); _allocElems = allocSize; std::atomic_thread_fence(std::memory_order_release); } diff --git a/searchlib/src/vespa/searchlib/common/allocatedbitvector.cpp b/searchlib/src/vespa/searchlib/common/allocatedbitvector.cpp index d6795f4b583..255ee64633d 100644 --- a/searchlib/src/vespa/searchlib/common/allocatedbitvector.cpp +++ b/searchlib/src/vespa/searchlib/common/allocatedbitvector.cpp @@ -5,20 +5,20 @@ #include <vespa/fastos/fastos.h> #include "allocatedbitvector.h" -namespace search -{ +namespace search { using vespalib::nbostream; using vespalib::GenerationHeldBase; using vespalib::GenerationHeldAlloc; using vespalib::GenerationHolder; +using vespalib::DefaultAlloc; void AllocatedBitVector::alloc() { uint32_t words = capacityWords(); words += (-words & 15); // Pad to 64 byte alignment const size_t sz(words * sizeof(Word)); - DefaultAlloc(sz).swap(_alloc); + DefaultAlloc::create(sz).swap(_alloc); assert(_alloc.size()/sizeof(Word) >= words); // Clear padding memset(static_cast<char *>(_alloc.get()) + sizeBytes(), 0, sz - sizeBytes()); diff --git a/searchlib/src/vespa/searchlib/common/bitvector.cpp b/searchlib/src/vespa/searchlib/common/bitvector.cpp index 25edae290de..441351ab724 100644 --- a/searchlib/src/vespa/searchlib/common/bitvector.cpp +++ b/searchlib/src/vespa/searchlib/common/bitvector.cpp @@ -14,6 +14,7 @@ using vespalib::make_string; using vespalib::IllegalArgumentException; using vespalib::hwaccelrated::IAccelrated; using vespalib::Optimized; +using vespalib::DefaultAlloc; namespace { @@ -31,8 +32,7 @@ void verifyContains(const search::BitVector & a, const search::BitVector & b) } ///////////////////////////////// -namespace search -{ +namespace search { using vespalib::nbostream; using vespalib::GenerationHeldBase; @@ -323,7 +323,7 @@ BitVector::create(Index numberOfElements, size_t vectorsize = getFileBytes(numberOfElements); file.DirectIOPadding(offset, vectorsize, padbefore, padafter); assert((padbefore & (getAlignment() - 1)) == 0); - AllocatedBitVector::Alloc alloc(padbefore + vectorsize + padafter); + AllocatedBitVector::Alloc alloc = DefaultAlloc::create(padbefore + vectorsize + padafter, 0x1000000, 0x1000); void * alignedBuffer = alloc.get(); file.ReadBuf(alignedBuffer, alloc.size(), offset - padbefore); bv.reset(new AllocatedBitVector(numberOfElements, std::move(alloc), padbefore)); diff --git a/searchlib/src/vespa/searchlib/common/partialbitvector.cpp b/searchlib/src/vespa/searchlib/common/partialbitvector.cpp index b3472abe89a..59130ac7ec9 100644 --- a/searchlib/src/vespa/searchlib/common/partialbitvector.cpp +++ b/searchlib/src/vespa/searchlib/common/partialbitvector.cpp @@ -5,13 +5,13 @@ #include <vespa/fastos/fastos.h> #include "partialbitvector.h" -///////////////////////////////// -namespace search -{ +using vespalib::DefaultAlloc; + +namespace search { PartialBitVector::PartialBitVector(Index start, Index end) : BitVector(), - _alloc(numActiveBytes(start, end)) + _alloc(DefaultAlloc::create(numActiveBytes(start, end), 0x1000000, 0x1000)) { init(_alloc.get(), start, end); clear(); diff --git a/searchlib/src/vespa/searchlib/common/partialbitvector.h b/searchlib/src/vespa/searchlib/common/partialbitvector.h index 94facc9512a..c6c52b35808 100644 --- a/searchlib/src/vespa/searchlib/common/partialbitvector.h +++ b/searchlib/src/vespa/searchlib/common/partialbitvector.h @@ -16,8 +16,6 @@ namespace search { class PartialBitVector : public BitVector { public: - typedef vespalib::AutoAlloc<0x800000, 0x1000> Alloc; - /** * Class constructor specifying startindex and endindex. * Allocated area is zeroed. @@ -31,7 +29,7 @@ public: virtual ~PartialBitVector(void); private: - Alloc _alloc; + vespalib::alloc::Alloc _alloc; }; } // namespace search diff --git a/searchlib/src/vespa/searchlib/common/resultset.cpp b/searchlib/src/vespa/searchlib/common/resultset.cpp index ac69680b427..cdbfebdc1a9 100644 --- a/searchlib/src/vespa/searchlib/common/resultset.cpp +++ b/searchlib/src/vespa/searchlib/common/resultset.cpp @@ -3,15 +3,16 @@ // Copyright (C) 2003 Overture Services Norway AS #include <vespa/fastos/fastos.h> -#include <vespa/log/log.h> -LOG_SETUP(""); - #include <vespa/searchlib/common/resultset.h> #include <vespa/searchlib/common/bitvector.h> -namespace search -{ +using vespalib::DefaultAlloc; +using vespalib::alloc::Alloc; + +namespace search { +//Above 32M we hand back to the OS directly. +constexpr size_t MMAP_LIMIT = 0x2000000; ResultSet::ResultSet(void) : _elemsUsedInRankedHitsArray(0u), @@ -50,11 +51,9 @@ void ResultSet::allocArray(unsigned int arrayAllocated) { if (arrayAllocated > 0) { - ArrayAlloc n(arrayAllocated * sizeof(RankedHit)); - _rankedHitsArray.swap(n); + DefaultAlloc::create(arrayAllocated * sizeof(RankedHit), MMAP_LIMIT).swap(_rankedHitsArray); } else { - ArrayAlloc n; - _rankedHitsArray.swap(n); + Alloc().swap(_rankedHitsArray); } _rankedHitsArrayAllocElements = arrayAllocated; _elemsUsedInRankedHitsArray = 0; @@ -100,7 +99,7 @@ ResultSet::mergeWithBitOverflow(void) uint32_t bidx = bitVector->getFirstTrueBit(); uint32_t actualHits = getNumHits(); - ArrayAlloc newHitsAlloc(actualHits*sizeof(RankedHit)); + Alloc newHitsAlloc = DefaultAlloc::create(actualHits*sizeof(RankedHit), MMAP_LIMIT); RankedHit *newHitsArray = static_cast<RankedHit *>(newHitsAlloc.get()); RankedHit * tgtA = newHitsArray; diff --git a/searchlib/src/vespa/searchlib/common/resultset.h b/searchlib/src/vespa/searchlib/common/resultset.h index 4489654d0a5..46129b1fb57 100644 --- a/searchlib/src/vespa/searchlib/common/resultset.h +++ b/searchlib/src/vespa/searchlib/common/resultset.h @@ -13,14 +13,12 @@ namespace search class ResultSet { private: - // Everything above 8m we return to OS. - typedef vespalib::AutoAlloc<0x800000> ArrayAlloc; ResultSet& operator=(const ResultSet &); unsigned int _elemsUsedInRankedHitsArray; unsigned int _rankedHitsArrayAllocElements; - BitVector::UP _bitOverflow; - ArrayAlloc _rankedHitsArray; + BitVector::UP _bitOverflow; + vespalib::alloc::Alloc _rankedHitsArray; public: typedef std::unique_ptr<ResultSet> UP; diff --git a/searchlib/src/vespa/searchlib/common/sortresults.cpp b/searchlib/src/vespa/searchlib/common/sortresults.cpp index 485c0d550b9..76109f3ec42 100644 --- a/searchlib/src/vespa/searchlib/common/sortresults.cpp +++ b/searchlib/src/vespa/searchlib/common/sortresults.cpp @@ -17,8 +17,12 @@ using search::common::SortInfo; using search::attribute::IAttributeContext; using search::attribute::IAttributeVector; +using vespalib::DefaultAlloc; + namespace { +constexpr size_t MMAP_LIMIT = 0x2000000; + template<typename T> class RadixHelper { @@ -498,7 +502,7 @@ FastS_SortSpec::sortResults(RankedHit a[], uint32_t n, uint32_t topn) } else if (_method == 1) { std::sort(sortData, sortData + n, StdSortDataCompare(&_binarySortData[0])); } else { - vespalib::Array<uint32_t, Alloc> radixScratchPad(n); + vespalib::Array<uint32_t> radixScratchPad(n, DefaultAlloc::create(0, MMAP_LIMIT)); search::radix_sort(SortDataRadix(&_binarySortData[0]), StdSortDataCompare(&_binarySortData[0]), SortDataEof(), 1, sortData, n, &radixScratchPad[0], 0, 96, topn); } for (uint32_t i(0), m(_sortDataArray.size()); i < m; ++i) { diff --git a/searchlib/src/vespa/searchlib/common/sortresults.h b/searchlib/src/vespa/searchlib/common/sortresults.h index bf549f72bf5..53b0c4b0e8d 100644 --- a/searchlib/src/vespa/searchlib/common/sortresults.h +++ b/searchlib/src/vespa/searchlib/common/sortresults.h @@ -119,9 +119,8 @@ public: private: typedef std::vector<VectorRef> VectorRefList; - typedef vespalib::AutoAlloc<0x800000> Alloc; - typedef vespalib::Array<uint8_t, Alloc> BinarySortData; - typedef vespalib::Array<SortData, Alloc> SortDataArray; + typedef vespalib::Array<uint8_t> BinarySortData; + typedef vespalib::Array<SortData> SortDataArray; using ConverterFactory = search::common::ConverterFactory; vespalib::Doom _doom; const ConverterFactory & _ucaFactory; diff --git a/searchlib/src/vespa/searchlib/docstore/compacter.cpp b/searchlib/src/vespa/searchlib/docstore/compacter.cpp index 6a57b4fc791..d787f934efc 100644 --- a/searchlib/src/vespa/searchlib/docstore/compacter.cpp +++ b/searchlib/src/vespa/searchlib/docstore/compacter.cpp @@ -24,7 +24,7 @@ BucketCompacter::BucketCompacter(size_t maxSignificantBucketBits, const Compress _bucketizer(bucketizer), _writeCount(0), _lock(), - _backingMemory(0x40000000, &_lock), + _backingMemory(vespalib::DefaultAlloc::create(0x40000000), &_lock), _tmpStore(), _lidGuard(ds.getLidReadGuard()), _bucketizerGuard(bucketizer.getGuard()), diff --git a/searchlib/src/vespa/searchlib/predicate/document_features_store.cpp b/searchlib/src/vespa/searchlib/predicate/document_features_store.cpp index 5e5e1617c10..c371b4be991 100644 --- a/searchlib/src/vespa/searchlib/predicate/document_features_store.cpp +++ b/searchlib/src/vespa/searchlib/predicate/document_features_store.cpp @@ -16,7 +16,7 @@ LOG_SETUP(".document_features_store"); using search::btree::BTreeNoLeafData; using search::btree::EntryRef; -using vespalib::MMapDataBuffer; +using vespalib::DataBuffer; using vespalib::stringref; using std::unordered_map; using std::vector; @@ -44,7 +44,7 @@ DocumentFeaturesStore::DocumentFeaturesStore(uint32_t arity) namespace { template <typename KeyComp, typename WordIndex> -void deserializeWords(MMapDataBuffer &buffer, +void deserializeWords(DataBuffer &buffer, memoryindex::WordStore &word_store, WordIndex &word_index, vector<EntryRef> &word_refs) { @@ -63,7 +63,7 @@ void deserializeWords(MMapDataBuffer &buffer, } template <typename RangeFeaturesMap> -void deserializeRanges(MMapDataBuffer &buffer, vector<EntryRef> &word_refs, +void deserializeRanges(DataBuffer &buffer, vector<EntryRef> &word_refs, RangeFeaturesMap &ranges, size_t &num_ranges) { typedef typename RangeFeaturesMap::mapped_type::value_type Range; uint32_t ranges_size = buffer.readInt32(); @@ -84,7 +84,7 @@ void deserializeRanges(MMapDataBuffer &buffer, vector<EntryRef> &word_refs, } template <typename DocumentFeaturesMap> -void deserializeDocs(MMapDataBuffer &buffer, DocumentFeaturesMap &docs, +void deserializeDocs(DataBuffer &buffer, DocumentFeaturesMap &docs, size_t &num_features) { uint32_t docs_size = buffer.readInt32(); for (uint32_t i = 0; i < docs_size; ++i) { @@ -100,7 +100,7 @@ void deserializeDocs(MMapDataBuffer &buffer, DocumentFeaturesMap &docs, } } // namespace -DocumentFeaturesStore::DocumentFeaturesStore(MMapDataBuffer &buffer) +DocumentFeaturesStore::DocumentFeaturesStore(DataBuffer &buffer) : DocumentFeaturesStore(0) { _arity = buffer.readInt16(); @@ -238,7 +238,7 @@ void findUsedWords(const RangeFeaturesMap &ranges, } } -void serializeWords(MMapDataBuffer &buffer, const vector<EntryRef> &word_list, +void serializeWords(DataBuffer &buffer, const vector<EntryRef> &word_list, const memoryindex::WordStore &word_store) { buffer.writeInt32(word_list.size()); for (const auto &word_ref : word_list) { @@ -250,7 +250,7 @@ void serializeWords(MMapDataBuffer &buffer, const vector<EntryRef> &word_list, } template <typename RangeFeaturesMap> -void serializeRanges(MMapDataBuffer &buffer, RangeFeaturesMap &ranges, +void serializeRanges(DataBuffer &buffer, RangeFeaturesMap &ranges, unordered_map<uint32_t, uint32_t> &word_map) { buffer.writeInt32(ranges.size()); for (const auto &range_features_entry : ranges) { @@ -265,7 +265,7 @@ void serializeRanges(MMapDataBuffer &buffer, RangeFeaturesMap &ranges, } template <typename DocumentFeaturesMap> -void serializeDocs(MMapDataBuffer &buffer, DocumentFeaturesMap &docs) { +void serializeDocs(DataBuffer &buffer, DocumentFeaturesMap &docs) { buffer.writeInt32(docs.size()); for (const auto &doc_features_entry : docs) { buffer.writeInt32(doc_features_entry.first); // doc id @@ -277,7 +277,7 @@ void serializeDocs(MMapDataBuffer &buffer, DocumentFeaturesMap &docs) { } } // namespace -void DocumentFeaturesStore::serialize(MMapDataBuffer &buffer) const { +void DocumentFeaturesStore::serialize(DataBuffer &buffer) const { vector<EntryRef> word_list; unordered_map<uint32_t, uint32_t> word_map; diff --git a/searchlib/src/vespa/searchlib/predicate/simple_index.hpp b/searchlib/src/vespa/searchlib/predicate/simple_index.hpp index 10ba3e79a02..ca597708735 100644 --- a/searchlib/src/vespa/searchlib/predicate/simple_index.hpp +++ b/searchlib/src/vespa/searchlib/predicate/simple_index.hpp @@ -69,7 +69,7 @@ SimpleIndex<Posting, Key, DocId>::~SimpleIndex() { template <typename Posting, typename Key, typename DocId> void SimpleIndex<Posting, Key, DocId>::serialize( - vespalib::MMapDataBuffer &buffer, + vespalib::DataBuffer &buffer, const PostingSerializer<Posting> &serializer) const { assert(sizeof(Key) <= sizeof(uint64_t)); assert(sizeof(DocId) <= sizeof(uint32_t)); @@ -90,7 +90,7 @@ void SimpleIndex<Posting, Key, DocId>::serialize( template <typename Posting, typename Key, typename DocId> void SimpleIndex<Posting, Key, DocId>::deserialize( - vespalib::MMapDataBuffer &buffer, + vespalib::DataBuffer &buffer, PostingDeserializer<Posting> &deserializer, SimpleIndexDeserializeObserver<Key, DocId> &observer, uint32_t version) { typename Dictionary::Builder builder(_dictionary.getAllocator()); diff --git a/searchlib/src/vespa/searchlib/transactionlog/domainpart.cpp b/searchlib/src/vespa/searchlib/transactionlog/domainpart.cpp index 274a3495e73..776924a8c85 100644 --- a/searchlib/src/vespa/searchlib/transactionlog/domainpart.cpp +++ b/searchlib/src/vespa/searchlib/transactionlog/domainpart.cpp @@ -221,7 +221,7 @@ DomainPart::buildPacketMapping(bool allowTruncate) SerialNum lastSerial(0); int64_t firstPos(currPos); bool full(false); - vespalib::DefaultAlloc buf; + vespalib::alloc::Alloc buf; for(size_t i(0); !full && (currPos < fSize); i++) { Packet::Entry e; if (read(transLog, e, buf, allowTruncate)) { @@ -552,7 +552,7 @@ DomainPart::visit(FastOS_FileInterface &file, SerialNumRange &r, Packet &packet) } if (retval) { Packet newPacket; - vespalib::DefaultAlloc buf; + vespalib::alloc::Alloc buf; for (bool full(false);!full && retval && (r.from() < r.to());) { Packet::Entry e; int64_t fPos = file.GetPosition(); @@ -612,7 +612,7 @@ DomainPart::write(FastOS_FileInterface &file, const Packet::Entry &entry) bool DomainPart::read(FastOS_FileInterface &file, Packet::Entry &entry, - vespalib::DefaultAlloc & buf, + vespalib::alloc::Alloc & buf, bool allowTruncate) { bool retval(true); @@ -636,7 +636,7 @@ DomainPart::read(FastOS_FileInterface &file, } } if (len > buf.size()) { - vespalib::DefaultAlloc(len).swap(buf); + vespalib::DefaultAlloc::create(len).swap(buf); } rlen = file.Read(buf.get(), len); retval = rlen == len; diff --git a/searchlib/src/vespa/searchlib/transactionlog/domainpart.h b/searchlib/src/vespa/searchlib/transactionlog/domainpart.h index 04041a2cba0..59eb2f6be9a 100644 --- a/searchlib/src/vespa/searchlib/transactionlog/domainpart.h +++ b/searchlib/src/vespa/searchlib/transactionlog/domainpart.h @@ -70,7 +70,7 @@ private: static bool read(FastOS_FileInterface &file, Packet::Entry &entry, - vespalib::DefaultAlloc &buf, + vespalib::alloc::Alloc &buf, bool allowTruncate); void write(FastOS_FileInterface &file, const Packet::Entry &entry); |