We should not expect the exact match because, as discovered during bug
3805 (r13947) fix, shared Segment::size() may exceed the originally
requested RAM amount due to stat() page rounding done by OSes like OS X.
Unfortunately, this rounding weakens the failed consistency check a lot.
TODO: Store the exact requested size and check against that as well.
theSegment.open();
Must(theSegment.mem());
theObject = reinterpret_cast<Class*>(theSegment.mem());
- Must(static_cast<off_t>(theObject->sharedMemorySize()) == theSegment.size());
+ Must(static_cast<off_t>(theObject->sharedMemorySize()) <= theSegment.size());
}
template <class Class>