use mmap on 64-bit machines to speed-up reads; small build fixes

This commit is contained in:
Sanjay Ghemawat
2012-03-15 09:14:00 -07:00
parent 583f1499c0
commit 9013f13b15
8 changed files with 99 additions and 39 deletions

View File

@@ -205,7 +205,7 @@ class BlockConstructor: public Constructor {
block_size_ = block_data.size();
char* block_data_copy = new char[block_size_];
memcpy(block_data_copy, block_data.data(), block_size_);
block_ = new Block(block_data_copy, block_size_);
block_ = new Block(block_data_copy, block_size_, true /* take ownership */);
return Status::OK();
}
virtual size_t NumBytes() const { return block_size_; }