diff options
author | gabor@google.com <gabor@google.com@62dab493-f737-651d-591e-8d6aee1b9529> | 2011-07-19 23:36:47 +0000 |
---|---|---|
committer | gabor@google.com <gabor@google.com@62dab493-f737-651d-591e-8d6aee1b9529> | 2011-07-19 23:36:47 +0000 |
commit | 6872ace90110799f87402cbc594c4cbf1bc474c7 (patch) | |
tree | e6292e5ec9404ddab7c1de7b7272927161b06232 /db/repair.cc | |
parent | 6699c7ebe68fba9673ea7a78b54e0eb558102301 (diff) | |
download | leveldb-6872ace90110799f87402cbc594c4cbf1bc474c7.tar.gz |
Sun Studio support, and fix for test related memory fixes.
- LevelDB patch for Sun Studio
Based on a patch submitted by Theo Schlossnagle - thanks!
This fixes Issue 17.
- Fix a couple of test related memory leaks.
git-svn-id: https://leveldb.googlecode.com/svn/trunk@38 62dab493-f737-651d-591e-8d6aee1b9529
Diffstat (limited to 'db/repair.cc')
-rw-r--r-- | db/repair.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/db/repair.cc b/db/repair.cc index ae1b136..2e3f506 100644 --- a/db/repair.cc +++ b/db/repair.cc @@ -50,6 +50,7 @@ class Repairer { icmp_(options.comparator), options_(SanitizeOptions(dbname, &icmp_, options)), owns_info_log_(options_.info_log != options.info_log), + owns_cache_(options_.block_cache != options.block_cache), next_file_number_(1) { // TableCache can be small since we expect each table to be opened once. table_cache_ = new TableCache(dbname_, &options_, 10); @@ -60,6 +61,9 @@ class Repairer { if (owns_info_log_) { delete options_.info_log; } + if (owns_cache_) { + delete options_.block_cache; + } } Status Run() { @@ -97,6 +101,7 @@ class Repairer { InternalKeyComparator const icmp_; Options const options_; bool owns_info_log_; + bool owns_cache_; TableCache* table_cache_; VersionEdit edit_; |