none
80% RAM usage?

    Question

  • Hi,

    Upgraded to Windows 8.1 last night, and suddenly windows is using 86% of my 8gigs of RAM. Adding up the programs usage in Task Manager doesn't add to this at all.. What the hell is going on? o.O Windows 8.0 was working fine and not even using 2gigs of RAM. Any suggestions really appreciated! 

    Monday, October 21, 2013 3:24 PM

Answers

All replies

  • We are also seeing huger memory usage

    Our investigation show that the basic delete memory operator is c++ is not working

    We are anxious to know the fix also

    Monday, October 21, 2013 3:41 PM
  • Please download RAMMap [1][2] and run it when you have the high Memory usage. Now save the data as a RMP file. Zip the RMP file and upload the zip to your SkyDrive [3] and post a link here.

    If you see a high paged pool memory usage, use poolmon [4], to see which driver is the cause.

    André

    [1] http://technet.microsoft.com/en-us/sysinternals/ff700229.aspx
    [2] http://blogs.technet.com/b/askperf/archive/2010/08/13/introduction-to-the-new-sysinternals-tool-rammap.aspx
    [3] http://social.technet.microsoft.com/Forums/en-US/w7itproui/thread/4fc10639-02db-4665-993a-08d865088d65
    [4] http://blogs.msdn.com/b/ntdebugging/archive/2012/08/30/troubleshooting-pool-leaks-part-2-poolmon.aspx

    "A programmer is just a tool which converts caffeine into code"

    Monday, October 21, 2013 7:35 PM
    Answerer
  • And what step do I take when RAMMap just gives me "Error refreshing Database" error?
    Monday, October 21, 2013 11:02 PM
  • Install the WPT (http://social.technet.microsoft.com/wiki/contents/articles/4847.install-the-windows-performance-toolkit-wpt.aspx , open a cmd prompt with admin rights and run this command for 60s:

    xperf -on latency+ReferenceSet -stackwalk Profile+VirtualAlloc -buffersize 1024 -MaxFile 512 -FileMode Circular && timeout -1 && xperf -d trace_VAlloc.et


    press a key to stop logging. Zip and upload the file to your skydrive and post a link here (post a link without http or replace http with hxxp if you still can't insert a full link)


    "A programmer is just a tool which converts caffeine into code"

    Tuesday, October 22, 2013 5:11 AM
    Answerer
  • OK here is a peace of code that leaks in windows 8.1

    create a main that runs this
    CStringCollectionTest StringCollectionTest;
     for(long i=0; i<100000; i++)
     {
      CStr* s = new CStr();
      StringCollectionTest.Add(s);
     }

    www.creativelifehosting.com/downloads/temp/testmem.h

    #ifndef __test__
    #define __test__

    template <class DERIVED_CLASS , class OBJECT_INTERFACE  >
    class  ISimpleCollectionTestImpl
     
    {
    public:

     long    m_SCCount;
      long    m_SCAllocatedCount;
     long    m_CollectionManageLock;
     OBJECT_INTERFACE**  m_SCItems;
     long*    m_Flags;

     ISimpleCollectionTestImpl()
     {
      m_SCCount   = 0;
       m_SCAllocatedCount = 0;
      m_CollectionManageLock = 0;
      m_SCItems   = NULL;
      m_Flags    = NULL;
     }

     ~ISimpleCollectionTestImpl()
     {
      SimpleCollectionClear();
      if(m_SCAllocatedCount)
      {
       delete [] m_SCItems;
       delete [] m_Flags;
      }
      m_SCAllocatedCount = 0;
     }

     STDMETHOD (CollectionLock)()
     {
     
      return S_OK;
     }

     STDMETHOD (CollectionUnlock)()
     {
      
      return S_OK;
     }


     STDMETHOD (get_Count)(long  *Count)
     {
      if(Count==NULL)
       return E_POINTER;
      *Count = m_SCCount;
      return S_OK;
     }

     STDMETHOD (get_ItemFlags)(long Index, long* Flags)
     {
      if(Index<0)
       return E_INVALIDARG;
      if(Index>=m_SCCount)
       return E_INVALIDARG;

      *Flags = m_Flags[Index];
      
      return S_OK;
     }

     STDMETHOD (put_ItemFlags)(long Index, long Flags)
     {
      if(Index<0)
       return E_INVALIDARG;
      if(Index>=m_SCCount)
       return E_INVALIDARG;
      m_Flags[Index] = Flags;
      return S_OK;
     }

     STDMETHOD (Add)(OBJECT_INTERFACE* item)
     {
      #define ALLOCINCREMENT 128
      
      if(item == NULL)
       return E_POINTER;
      CollectionLock();
      if(m_SCCount >= m_SCAllocatedCount)
      {
       OBJECT_INTERFACE** pTemp;
      
       long*    flags;
       m_SCAllocatedCount += ALLOCINCREMENT;
       pTemp = new OBJECT_INTERFACE*[m_SCAllocatedCount];
       
       flags = new long [m_SCAllocatedCount];
       for( int r = 0;r<m_SCCount;r++)
       {
        pTemp[r] = m_SCItems[r];
        flags[r] = m_Flags[r];
       }

       if(m_SCItems)
       {
        delete [] m_SCItems;
        delete [] m_Flags;
       }
       m_SCItems = pTemp;
       m_Flags = flags;
      }

      m_SCItems[m_SCCount] = item;
     // m_SCItems[m_SCCount]->AddRef();
      m_Flags[m_SCCount]=0;
      m_SCCount++;
      CollectionUnlock();
      #undef ALLOCINCREMENT
      return S_OK;
     }

     STDMETHOD (Remove)(long Index)
     {
      if(Index<0)
       return E_INVALIDARG;
      if(Index>=m_SCCount)
       return E_INVALIDARG;

      if(m_SCItems[Index])
       m_SCItems[Index]->Release();

      
      for(long i=Index; i<m_SCCount-1; i++)
      {
       m_SCItems[i] = m_SCItems[i+1];
       m_Flags[i] = m_Flags[i+1];
      }
      m_SCCount--;
      m_SCItems[m_SCCount] = NULL;
      return S_OK;
     }

     STDMETHOD (SimpleCollectionClear)()
     {
      long Count = m_SCCount;
      m_SCCount = 0;  // stops recursive
      for(long i = 0;i<Count;i++)
      {
       if(m_SCItems[i])
        m_SCItems[i]->Release();
       m_SCItems[i] = 0;
       m_Flags[i] = 0;
      }
      m_SCCount   = 0;
      return S_OK;
     }

    }; 

    class CStr

    {
    public:
     CStr()
     {
      
     }


     unsigned long __stdcall Release()
     {
      
       delete this;
       return 0;
     }
    };


    /////////////////////////////////////////////////////////////////////////////
    // CStringCollection
    #define STRINGCOLLECTION  ISimpleCollectionTestImpl<CStringCollectionTest, CStr>

    class  CStringCollectionTest :
     public STRINGCOLLECTION

    {
    public:
     CStringCollectionTest()
     {
     
     }

     STDMETHOD (Add)(CStr* i)
     {
      
      
      return STRINGCOLLECTION::Add(i);
     }
     STDMETHOD (Clear)()
     {
      
      return SimpleCollectionClear();
      
     }

     
    };

    Tuesday, October 22, 2013 10:53 AM
  • to explain further  this example code uses approx. 400 Mbytes in wins 8.1
    and approx. 4Mbytes in windows 7 (and windows 8)

    the error in windows 8.1 is the deletes in line 110/111 in testmem.h are not working

    the code is written using visual studio 8

    the link to code and executable are here

    www.creativelifehosting.com/downloads/temp/MemTest.zip

    you need to bring up task manager and see the memory usage
    any key exits the program

    thanks

    Frank Meyer

    Tuesday, October 22, 2013 11:28 AM
  • Just to let you know my problem was solved by uninstalling AMD Catalyst Control. Must be an issue with the drivers.
    Tuesday, October 22, 2013 1:29 PM
  • Although Seanmcn issue is resolved

    the Fmeyer  win 8.1 mem leak has grounded us
    Is there any feedback on this

    thanks

    Tuesday, October 22, 2013 7:10 PM
  • create a new topic about your issue. This time include a .h files so that I can compile it or provide a PDB for the Exe.

    Also provide a xperf file. Run this command:

    xperf -on latency+ReferenceSet -stackwalk Profile+VirtualAlloc+VirtualFree -buffersize 1024 -MaxFile 512 -FileMode Circular && timeout -1 && xperf -d trace_VAllocVirtualFree.et

    This also traces frees.


    "A programmer is just a tool which converts caffeine into code"

    Wednesday, October 23, 2013 5:43 AM
    Answerer
  • the download link has the source and executable and the memtest.h

    www.creativelifehosting.com/downloads/temp/MemTest.zip

    I will run the xperf and  get back to you (on a new topic thread as oer request)

    Wednesday, October 23, 2013 12:24 PM
  • I could not get xpert to run

    (report NT kermel logger invalid)

    This is now posted to new topic  - so hopefully with the source uploaded you can help

    thanks

    Wednesday, October 23, 2013 1:15 PM