folly::FunctionScheduler: Adding support for uniform interval distribution
[folly.git] / folly / Malloc.cpp
index d1a242c228dfbb0b42e9464d45f04fec9e9e3a5a..aa2175c7f165c945da569b6aa2ee8250cdbd8c84 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2014 Facebook, Inc.
+ * Copyright 2015 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,13 +31,14 @@ bool usingJEMallocSlow() {
   // (!!). http://goo.gl/xpmctm
   if (mallocx == nullptr || rallocx == nullptr || xallocx == nullptr
       || sallocx == nullptr || dallocx == nullptr || nallocx == nullptr
-      || mallctl == nullptr) {
+      || mallctl == nullptr || mallctlnametomib == nullptr
+      || mallctlbymib == nullptr) {
     return false;
   }
 
   // "volatile" because gcc optimizes out the reads from *counter, because
   // it "knows" malloc doesn't modify global state...
-  volatile uint64_t* counter;
+  /* nolint */ volatile uint64_t* counter;
   size_t counterLen = sizeof(uint64_t*);
 
   if (mallctl("thread.allocatedp", static_cast<void*>(&counter), &counterLen,