oleaut32.dll is allocating some more memory for vs2017

MRUTYUNJAYA MAHAPATRA 1 Reputation point
2021-04-22T08:22:19.673+00:00

Hi,

I have one project in vs2012 which was migrated to vs2017. After migration to vs2017, we observed that it(Process) is consuming memory through oleaut32.dll.

I am using SAFEARRAY * psaItemIds = ::SafeArrayCreate( VT_BSTR, 1, bound ); in my project.
Dubugdiag log indicates to oleaut32.dll which ultimately indicates to SafeArrayCreate

SafeArrayCreate is used in both vs2012 and vs2017 project. After migration why vs2017 project is using more memory through oleaut32.dll .

Can anybody please suggest any idea to reduce memory consumption

Best Regards
Mrutyunjaya

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,108 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,416 questions
Windows 10 Network
Windows 10 Network
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Network: A group of devices that communicate either wirelessly or via a physical connection.
2,270 questions
Windows Network
Windows Network
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Network: A group of devices that communicate either wirelessly or via a physical connection.
645 questions
{count} votes

2 answers

Sort by: Most helpful
  1. MRUTYUNJAYA MAHAPATRA 1 Reputation point
    2021-04-22T09:18:31.347+00:00

    vs2012 Project

    Top 9 modules by allocation count
    msvcr110 54 allocation(s)
    ntdll 22 allocation(s)
    rpcrt4 12 allocation(s)
    mswsock 06 allocation(s)
    ucrtbase 03 allocation(s
    msvcrt 03 allocation(s)
    CalcDiags 03 allocation(s)
    combase 01 allocation(s)
    EngineServer 01 allocation(s)

    Memory Globals.Manager statistics by allocation count
    Heap memory Globals.Manager 104 allocation(s)
    OLE automation BSTR memory Globals.Manager 01 allocation(s)

    0 comments No comments

  2. MRUTYUNJAYA MAHAPATRA 1 Reputation point
    2021-04-22T09:26:09.497+00:00

    vs2017
    Top 9 modules by allocation count
    oleaut32 1,142 allocation(s) Extra memory allocation from this module
    ntdll 67 allocation(s)
    ucrtbase 57 allocation(s)
    rpcrt4 10 allocation(s)
    CalcDiags 06 allocation(s)
    mswsock 06 allocation(s)
    msvcrt 03 allocation(s)
    combase 02 allocation(s)
    EngineServer 01 allocation(s)

    Memory Globals.Manager statistics by allocation count
    OLE/COM memory Globals.Manager 1,142 allocation(s)
    Heap memory Globals.Manager 151 allocation(s)
    OLE automation BSTR memory Globals.Manager 01 allocation(s)

    Call Stack of Oleaut32.dll

    Function details

    Function oleaut32!SafeArrayCreate+153
    Source Line
    Allocation type OLE/COM allocation(s)
    Allocation Count 571 allocation(s)
    Allocation Size 111.52 KBytes
    Leak Probability 99%

    Call stack sample 1

    Address 0x00000000
    Allocation Time 00:05:52 since tracking started
    Allocation Size 200 Bytes

    0 comments No comments