zoukankan      html  css  js  c++  java
  • 显示程序使用最大内存函数

     
    #ifdef AEE_SIMULATOR ////modify by lancer at 2007-03-15
    void Eragon::useCheckMemory( )
    {
           IShell* pIShell=((AEEApplet*)GETAPPINSTANCE())->m_pIShell;
           IHeap* pIHeap;
           uint32 num;
           AEEDeviceInfo di;
           pIHeap = NULL;
     
    //     uint32 un32Max = 0;
     
           if (SUCCESS != ISHELL_CreateInstance(pIShell,       AEECLSID_HEAP, (void**)&pIHeap))
           {
                  return;
           }
     
           ISHELL_GetDeviceInfo(pIShell, &di);
           num = IHEAP_GetMemStats(pIHeap);
           if (num>maxMemory || num>MAX_NEED_HEAP1_SIZE){
                  if (num>MAX_NEED_HEAP1_SIZE)
                  {
                         DBGPRINTF("--------------------------out of memory-------------------!");
                  }
    DBGPRINTF("total RAM :%d", di.dwRAM);
    DBGPRINTF("Now used RAM is:%d", num);
    DBGPRINTF("free RAM:%d", di.dwRAM - num);
    maxMemory = num;
           }
     
           IHEAP_Release(pIHeap);
           return;
    }
    #endif 
  • 相关阅读:
    AtCoder 杂题乱写
    JOISC2020 遗迹
    【考试总结】20220107
    AGC021F Trinity
    CCPC2021 广州A/CF Gym103415A
    【考试总结】20220115
    JDK8 时间api当天的开始和截至时间
    技术方案模板
    正则表达式
    组合算法
  • 原文地址:https://www.cnblogs.com/secbook/p/2655477.html
Copyright © 2011-2022 走看看