C++ InternetOpenUrlW - Memory usage -


update: replies. think understand why happens , possibly try reduce memory usage. also, yes use internetclosehandle doesnt change memory usage.

i'm writing simple c++ application. 1 of methods downloads very small file memory , returns string.

however, noticed 1 particular part of code makes program take 7x more memory (from 1mb 7mb) find weird , avoid it. below code snippet explaining when memory usage spike happens:

//internetopenw() doesnt trigger memory usage spike. hopen = internetopenw(l"myagent", null, null, null, null); if (!hopen) return null;  //when internetopenurlw() runs, memory spikes. hfile = internetopenurlw(hopen, szurl, null, null, internet_flag_reload | internet_flag_dont_cache, null); if (!hfile)  {     internetclosehandle(hopen);     return null; } 

the memory usage never goes down wonder if possible it.


it suggested check modules loaded when internetopenurlw() executed. below output of modules loaded step. however, im not gonna lie, have no idea mean or how should proceed.

'application.exe' (win32): loaded 'c:\windows\syswow64\mswsock.dll'. cannot find or open pdb file. 'application.exe' (win32): loaded 'c:\windows\syswow64\iphlpapi.dll'. cannot find or open pdb file. 'application.exe' (win32): loaded 'c:\windows\syswow64\winnsi.dll'. cannot find or open pdb file. 'application.exe' (win32): loaded 'c:\windows\syswow64\wship6.dll'. cannot find or open pdb file. 'application.exe' (win32): loaded 'c:\windows\syswow64\api-ms-win-downlevel-shlwapi-l2-1-0.dll'. cannot find or open pdb file. 'application.exe' (win32): loaded 'c:\windows\syswow64\dnsapi.dll'. cannot find or open pdb file. 'application.exe' (win32): loaded 'c:\windows\syswow64\clbcatq.dll'. cannot find or open pdb file. 'application.exe' (win32): loaded 'c:\windows\syswow64\oleaut32.dll'. cannot find or open pdb file. 'application.exe' (win32): loaded 'c:\windows\syswow64\wshtcpip.dll'. cannot find or open pdb file. 'application.exe' (win32): loaded 'c:\windows\syswow64\netprofm.dll'. cannot find or open pdb file. 'application.exe' (win32): loaded 'c:\windows\syswow64\nlaapi.dll'. cannot find or open pdb file. 'application.exe' (win32): loaded 'c:\windows\syswow64\dhcpcsvc6.dll'. cannot find or open pdb file. 'application.exe' (win32): loaded 'c:\windows\syswow64\rasadhlp.dll'. cannot find or open pdb file. 'application.exe' (win32): loaded 'c:\windows\syswow64\urlmon.dll'. cannot find or open pdb file. 'application.exe' (win32): loaded 'c:\windows\syswow64\dhcpcsvc.dll'. cannot find or open pdb file. 'application.exe' (win32): loaded 'c:\windows\syswow64\cryptsp.dll'. cannot find or open pdb file. 'application.exe' (win32): loaded 'c:\windows\syswow64\rsaenh.dll'. cannot find or open pdb file. 'application.exe' (win32): loaded 'c:\windows\syswow64\rpcrtremote.dll'. cannot find or open pdb file. 'application.exe' (win32): loaded 'c:\windows\syswow64\npmproxy.dll'. cannot find or open pdb file. 'application.exe' (win32): loaded 'c:\windows\syswow64\fwpuclnt.dll'. cannot find or open pdb file. 'application.exe' (win32): loaded 'c:\windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.18807_none_41e554362bd82458\comctl32.dll'. cannot find or open pdb file. 'application.exe' (win32): loaded 'c:\windows\syswow64\ws2_32.dll'. cannot find or open pdb file. 'application.exe' (win32): unloaded 'c:\windows\syswow64\ws2_32.dll' 


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -