Browse Source

[2831] Add a comment and make a minor comment update

Mukund Sivaraman 12 years ago
parent
commit
e9e336900e

+ 2 - 0
src/lib/util/memory_segment_mapped.cc

@@ -227,7 +227,9 @@ MemorySegmentMapped::shrinkToFit() {
         return;
     }
 
+    // First, (unmap and) close the underlying file.
     impl_->base_sgmt_.reset();
+
     BaseSegment::shrink_to_fit(impl_->filename_.c_str());
     try {
         // Remap the grown file; this should succeed, but it's not 100%

+ 1 - 1
src/lib/util/tests/memory_segment_common_unittest.cc

@@ -25,7 +25,7 @@ namespace test {
 
 void
 checkSegmentNamedAddress(MemorySegment& segment, bool out_of_segment_ok) {
-    // If not exist, null pointer will be returned.
+    // If the name does not exist, NULL should be returned.
     EXPECT_EQ(static_cast<void*>(0), segment.getNamedAddress("test address"));
 
     // Now set it