40 int main (
int argc,
char **argv )
43 cout <<
"Starting check if binary specific config is read and used properly" << endl;
52 if ( config.
memoryManager.
value !=
"cyclicManagedMemory" || reinterpret_cast<cyclicManagedMemory *> ( man ) == NULL ) {
53 cerr <<
"Manager is wrong!" << endl;
57 if ( config.
swap.
value !=
"managedDummySwap" || reinterpret_cast<managedDummySwap *> ( swap ) == NULL ) {
58 cerr <<
"Swap is wrong!" << endl;
68 cerr <<
"Swap limit is wrong! " << config.
swapMemory.
value <<
" != 1000000000" << endl;
73 cerr <<
"Swap files are named incorrectly! " << config.
swapfiles.
value <<
" != rambrainswapconfigtest-%d-%d" << endl;
81 ADHERETOLOC (
double, data1, d );
82 for (
int i = 0; i < 10; ++i ) {
84 cerr <<
"Swapped in data is wrong at index " << i << endl;
90 cout << endl <<
"Done, " << ret <<
" errors occured" << endl;
const configuration & getConfig()
Simple getter.
Class that serves as a backend to managedMemory to actual write/read managedMemoryChunks to/from hard...
Main class to allocate memory that is managed by the rambrain memory defaultManager.
virtual global_bytesize getSwapSize() const
Simple getter.
managedSwap * configTestGetSwap(managedMemory *man)
configLine< string > swapfiles
Main struct to save configuration variables.
int main(int argc, char **argv)
A test to check if binary specific custom config files are properly read in and used.
void setCustomConfigPath(const string &path)
Simple setter.
rambrainConfig config
You will find the object in managedMemory.cpp as we have to define it in some 'used' file in the link...
void reinit(bool reread=true)
Reinitialises the system.
configLine< global_bytesize > memory
configLine< string > swap
global_bytesize getMemoryLimit() const
returns current memory limit
configLine< string > memoryManager
configLine< global_bytesize > swapMemory
Backend class to handle raw memory and interaction/storage with managedSwap.