summaryrefslogtreecommitdiff
path: root/util/arena_test.cc
diff options
context:
space:
mode:
authorDavid Grogan <dgrogan@chromium.org>2013-12-10 10:36:31 -0800
committerDavid Grogan <dgrogan@chromium.org>2013-12-10 10:36:31 -0800
commit0cfb990d58ffba9b56df6e9829ddb9d220824066 (patch)
tree3fbb7b8fae37a78ffa9991cb0b57e3dbbb24e373 /util/arena_test.cc
parent0b9a89f40efdd143fa1426e7d5cd997f67ba6361 (diff)
downloadleveldb-0cfb990d58ffba9b56df6e9829ddb9d220824066.tar.gz
Release LevelDB 1.15v1.15
- switched from mmap based writing to simpler stdio based writing. Has a minor impact (0.5 microseconds) on microbenchmarks for asynchronous writes. Synchronous writes speed up from 30ms to 10ms on linux/ext4. Should be much more reliable on diverse platforms. - compaction errors now immediately put the database into a read-only mode (until it is re-opened). As a downside, a disk going out of space and then space being created will require a re-open to recover from, whereas previously that would happen automatically. On the plus side, many corruption possibilities go away. - force the DB to enter an error-state so that all future writes fail when a synchronous log write succeeds but the sync fails. - repair now regenerates sstables that exhibit problems - fix issue 218 - Use native memory barriers on OSX - fix issue 212 - QNX build is broken - fix build on iOS with xcode 5 - make tests compile and pass on windows
Diffstat (limited to 'util/arena_test.cc')
-rw-r--r--util/arena_test.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/arena_test.cc b/util/arena_test.cc
index 63d1778..58e870e 100644
--- a/util/arena_test.cc
+++ b/util/arena_test.cc
@@ -40,7 +40,7 @@ TEST(ArenaTest, Simple) {
r = arena.Allocate(s);
}
- for (int b = 0; b < s; b++) {
+ for (size_t b = 0; b < s; b++) {
// Fill the "i"th allocation with a known bit pattern
r[b] = i % 256;
}
@@ -51,10 +51,10 @@ TEST(ArenaTest, Simple) {
ASSERT_LE(arena.MemoryUsage(), bytes * 1.10);
}
}
- for (int i = 0; i < allocated.size(); i++) {
+ for (size_t i = 0; i < allocated.size(); i++) {
size_t num_bytes = allocated[i].first;
const char* p = allocated[i].second;
- for (int b = 0; b < num_bytes; b++) {
+ for (size_t b = 0; b < num_bytes; b++) {
// Check the "i"th allocation for the known bit pattern
ASSERT_EQ(int(p[b]) & 0xff, i % 256);
}