MallocOpts_t.cpp
Go to the documentation of this file.
2 
3 #include <cassert>
4 
5 using namespace std;
6 
7 int
8 main()
9 {
11  art::MallocOpts mycopy = mo.get(), defaultt;
12 
13  assert(mo.retrieveFromEnv() == false);
14  assert(mo.hasErrors() == false);
15  mo.set_mmap_max(1);
16  mo.adjustMallocParams();
17  assert(mo.hasErrors() == false);
18 
19 #if defined(__x86_64__) || defined(__i386__)
20  assert(mo.retrieveFromCpuType() == true);
21  assert(mo.get() == mycopy);
22  assert(defaultt != mycopy);
23 #endif
24 
25  return 0;
26 }
STL namespace.
int main()
Definition: MallocOpts_t.cpp:8
bool hasErrors() const
Definition: MallocOpts.h:70
void set_mmap_max(opt_type mmap_max)
Definition: MallocOpts.h:81
MallocOpts get() const
Definition: MallocOpts.h:106