X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FIndexedMemPool.h;h=d03c35c65cc574a3a80ef7375de61324d8cbb58a;hb=fd915b73606e09a5f46a1bca0a5d3643a1567014;hp=a668627ed817ee54562585a84ba9d3b36cd967a7;hpb=9b5a1e4b0de245bdd2315f90a3ffd3888ee40ec2;p=folly.git diff --git a/folly/IndexedMemPool.h b/folly/IndexedMemPool.h index a668627e..d03c35c6 100644 --- a/folly/IndexedMemPool.h +++ b/folly/IndexedMemPool.h @@ -121,7 +121,7 @@ struct IndexedMemPool : boost::noncopyable { slots_ = static_cast(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(); }