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
This commit is contained in:
gabor@google.com
2011-07-19 23:36:47 +00:00
parent 6699c7ebe6
commit 6872ace901
13 changed files with 33 additions and 15 deletions

View File

@@ -5,6 +5,7 @@
#include "leveldb/table.h"
#include <map>
#include <string>
#include "db/dbformat.h"
#include "db/memtable.h"
#include "db/write_batch_internal.h"
@@ -25,7 +26,11 @@ namespace leveldb {
// Used to test non-lexicographic comparators.
static std::string Reverse(const Slice& key) {
std::string str(key.ToString());
std::string rev(str.rbegin(), str.rend());
std::string rev("");
for (std::string::reverse_iterator rit = str.rbegin();
rit != str.rend(); ++rit) {
rev.push_back(*rit);
}
return rev;
}
@@ -411,7 +416,7 @@ enum TestType {
TABLE_TEST,
BLOCK_TEST,
MEMTABLE_TEST,
DB_TEST,
DB_TEST
};
struct TestArgs {