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 
  • 相关阅读:
    去除文件中的空行
    数据分析 numpy matplotlib
    程序员
    c#
    java
    微信小游戏
    小游戏开发手册
    模板
    微信小程序小程序代码构成(.json .js .wxss .wxml)
    微信程序
  • 原文地址:https://www.cnblogs.com/secbook/p/2655477.html
Copyright © 2011-2022 走看看