Originally posted by: SystemAdmin
[arnaud.schulz said:]
Hi,
getTotalMemoryUsage() returns the heap size and getMemoryUsage() returns the size actually used in the heap.
With this example:
IloEnv env;
IloInt nbItems = 5;
cout << "Heap size is : " << env.getTotalMemoryUsage() << " bytes and we are using " << env.getMemoryUsage() << " bytes from it" << endl;<br />
IloIntRange items(env, 1, 5);
cout << "==== After IntRange creation ====" << endl;<br /> cout << "Heap size is : " << env.getTotalMemoryUsage() << " bytes and we are using " << env.getMemoryUsage() << " bytes from it" << endl;<br />
items.end();
cout << "==== After IntRange.end() ====" << endl;<br /> cout << "Heap size is : " << env.getTotalMemoryUsage() << " bytes and we are using " << env.getMemoryUsage() << " bytes from it" << endl;<br />
the output is:
Heap size is : 16032 bytes and we are using 1600 bytes from it
==== After IntRange creation ====
Heap size is : 16032 bytes and we are using 1624 bytes from it
==== After IntRange.end() ====
Heap size is : 16032 bytes and we are using 1600 bytes from it
Hope this helps,
Arnaud.
#CPLEXOptimizers#DecisionOptimization