I have a C ++ program running Visual Studio 2010, how can I control the memory usage of my program? Is there a simple API, for example, I can call clock_t start1 and start1 = clock(); to track the use of time by my program. Thanks:)
clock_t start1
start1 = clock();
Memory management is not a simple problem like synchronization, and it is definitely more difficult to track.
I recommend looking at other similar StackOverflow posts to get started:
How to analyze program memory usage in Visual Studio 2010?
How do you detect / avoid memory leaks in your (unmanaged) code?
track C ++ memory allocation
They should help you solve any of your specific memory problems, regardless of whether it searches for a memory leak, overwrites the end of the allocated buffer, or simply keeps track of how much memory you have allocated.
Source: https://habr.com/ru/post/913378/More articles:How to check if user logged_in is registered on Drupal site using JavaScript? - javascriptUsing the glmulti package in R to exhaustively search for multiple regression for akaike weights - rSafari Extensions for Safari - javascriptSecurity hash salt generation using PHP mt_rand ()? - phpThe password for salts. Am I doing it right? - phpHow to connect a huge file download to socket.io in Node.js - node.jsRename namespace in NetBeans PHP? - phpHow can I distinguish between non-fixed float and one with value 0? - equalityExcel 2007 Conditional formatting with two conditions, one of which is different from the other column - excel-vbaHow to use RVM to install Ruby 1.9.3 when installing Xcode 4.3.2 and gcc is missing? - ruby-on-railsAll Articles