diff --git a/include/gcache/ghost_cache.h b/include/gcache/ghost_cache.h index 9a0d627..23dc4c4 100644 --- a/include/gcache/ghost_cache.h +++ b/include/gcache/ghost_cache.h @@ -32,7 +32,7 @@ class GhostKvCache; * Templated type Meta must have a field size_idx; in almost all cases, this * field does not need to specified; it is only useful if there is some * additional per-page metadata to be carried. - * To support cache size of differnet scales, we support templates numerical + * To support cache size of different scales, we support templates numerical * type for cache size. */ template , @@ -245,7 +245,7 @@ GhostCache::access_impl(SizeType block_id, * 1) every node at boundary with size_idx < X should increase its size_idx * and the boundary pointer shall move to its next. * 2) X's size_idx should be set to 0. - * 3) if X itself is a boundary, set that boundary to X's next (sucessor). + * 3) if X itself is a boundary, set that boundary to X's next (successor). */ SizeType size_idx; if (s) { // No new insertion diff --git a/include/gcache/ghost_kv_cache.h b/include/gcache/ghost_kv_cache.h index b1cefd0..f188946 100644 --- a/include/gcache/ghost_kv_cache.h +++ b/include/gcache/ghost_kv_cache.h @@ -131,7 +131,7 @@ class SampledGhostKvCache { } return curve; // should be implicitly moved by compiler - // avoid explict move for Return Value Optimization (RVO) + // avoid explicit move for Return Value Optimization (RVO) } }; } // namespace gcache diff --git a/include/gcache/lru_cache.h b/include/gcache/lru_cache.h index 66f4c2e..4e0af63 100644 --- a/include/gcache/lru_cache.h +++ b/include/gcache/lru_cache.h @@ -94,7 +94,7 @@ class LRUCache { void pin(Handle_t handle); /** - * The normal opeartions (`insert`/`lookup`/`release`) will only cause a node + * The normal operations (`insert`/`lookup`/`release`) will only cause a node * to flow among the lru list, the in-use list, and the free list. * Only `erase` will force a node to jump out of circulation, and only * `install` may add a node. When a node is erased, its value is trashed @@ -196,7 +196,7 @@ class LRUCache { // This list is only maintained for memory efficiency purposes. Node_t erased_; - // Pool for additionaly allocated handles. + // Pool for additionally allocated handles. std::vector extra_pool_; template @@ -242,7 +242,7 @@ inline LRUCache::~LRUCache() { delete[] pool_; delete table_; } - /* `extrac_pool_` is always owned by this instance. */ + /* `extra_pool_` is always owned by this instance. */ for (auto e : extra_pool_) delete e; } diff --git a/tests/test_ghost.cpp b/tests/test_ghost.cpp index a9301f6..700e2c6 100644 --- a/tests/test_ghost.cpp +++ b/tests/test_ghost.cpp @@ -180,7 +180,7 @@ void bench1() { auto ts3 = rdtsc(); for (uint32_t i = 0; i < bench_size / 8; ++i) { - // manually flatten the loop, becaues we cannot turn on compiler + // manually flatten the loop, because we cannot turn on compiler // optimization which will remove the whole loop since it produces nothing. gcache::ghash{}(i * 8); gcache::ghash{}(i * 8 + 1); @@ -391,7 +391,7 @@ int main() { test3(); // test checkpoint and recover bench1(); // ghost cache w/o sampling bench2(); // ghost cache w/ sampling - bench3(); // hit rate comparsion + bench3(); // hit rate comparison bench4(); // large bench: may exceed CPU cache size bench5(); // real random access return 0;