Fix global statics
[folly.git] / folly / IndexedMemPool.h
index a668627ed817ee54562585a84ba9d3b36cd967a7..d03c35c65cc574a3a80ef7375de61324d8cbb58a 100644 (file)
@@ -121,7 +121,7 @@ struct IndexedMemPool : boost::noncopyable {
     slots_ = static_cast<Slot*>(mmap(nullptr, mmapLength_,
                                      PROT_READ | PROT_WRITE,
                                      MAP_PRIVATE | MAP_ANONYMOUS, -1, 0));
-    if (slots_ == nullptr) {
+    if (slots_ == MAP_FAILED) {
       assert(errno == ENOMEM);
       throw std::bad_alloc();
     }