Skip to content

Commit cb555c0

Browse files
rlyerlymeta-codesync[bot]
authored andcommitted
Delete unused function in SysVShmSegment
Summary: This function was defined but never called. We already create the shm segment with proper page size alignment, no need to call this anymore. Reviewed By: AlnisM Differential Revision: D96969274 fbshipit-source-id: 52af9dd43560f16f546efdf25c15a27444a7ef75
1 parent 37b7f06 commit cb555c0

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

cachelib/shm/SysVShmSegment.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@
2929
namespace facebook {
3030
namespace cachelib {
3131

32-
constexpr static uint32_t kHugePageSize = 1 << 21; // 2MB
33-
constexpr static uint32_t kModeRWFlags = 0666; // octal rw for ugo
34-
constexpr static uint32_t kModeRFlags = 0444; // octal ro for ugo
32+
constexpr static uint32_t kModeRWFlags = 0666; // octal rw for ugo
33+
constexpr static uint32_t kModeRFlags = 0444; // octal ro for ugo
3534

3635
namespace detail {
3736

@@ -206,12 +205,6 @@ void mbindImpl(void* addr,
206205

207206
} // namespace detail
208207

209-
void ensureSizeforHugePage(size_t size) {
210-
if (size % kHugePageSize) {
211-
util::throwSystemError(EINVAL, "Page not aligned to Huge page size");
212-
}
213-
}
214-
215208
int SysVShmSegment::createNewSegment(key_t key,
216209
size_t size,
217210
const ShmSegmentOpts& opts) {

0 commit comments

Comments
 (0)