Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
art
art
test
Utilities
MallocOpts_t.cpp
Go to the documentation of this file.
1
#include "
art/Utilities/MallocOpts.h
"
2
3
#include <cassert>
4
5
using namespace
std
;
6
7
int
8
main
()
9
{
10
art::MallocOptionSetter
mo;
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
}
art::MallocOptionSetter::retrieveFromCpuType
bool retrieveFromCpuType()
Definition:
MallocOpts.cc:111
std
STL namespace.
main
int main()
Definition:
MallocOpts_t.cpp:8
art::MallocOptionSetter::hasErrors
bool hasErrors() const
Definition:
MallocOpts.h:70
art::MallocOpts
Definition:
MallocOpts.h:33
art::MallocOptionSetter::retrieveFromEnv
bool retrieveFromEnv()
Definition:
MallocOpts.cc:172
MallocOpts.h
art::MallocOptionSetter::set_mmap_max
void set_mmap_max(opt_type mmap_max)
Definition:
MallocOpts.h:81
art::MallocOptionSetter
Definition:
MallocOpts.h:61
art::MallocOptionSetter::get
MallocOpts get() const
Definition:
MallocOpts.h:106
art::MallocOptionSetter::adjustMallocParams
void adjustMallocParams()
Definition:
MallocOpts.cc:146
Generated by
1.8.11