Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
Expand all | Collapse all

Concert Technology Memory Usage

  • 1.  Concert Technology Memory Usage

    Posted Thu June 12, 2008 06:27 PM

    Originally posted by: SystemAdmin


    [ozkok said:]

    Hi,

    There are two methods in class IloEnv related to memory usage and they are defined in the manual as provided below

    - getMemoryUsage (This member function returns a value in bytes indicating how full the heap is)
    - getTotalMemoryUsage (This member function returns a value in bytes indicating how large the heap is)

    I would like to know the exact difference between them.

    Is there anybody who knows their difference?

    Thanks in advance
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Concert Technology Memory Usage

    Posted Mon June 16, 2008 01:00 PM

    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