473,666 Members | 2,105 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How much memory used in function?

2 New Member
I have a large bit of code that uses a lot of dynamically allocated memory in 2d and 3d arrays. Is there any easy way to see how much memory my program is actually using at runtime?

Thanks
John
Nov 19 '08 #1
4 2110
RedSon
5,000 Recognized Expert Expert
What OS?
Nov 19 '08 #2
jgvicke
2 New Member
I am running Windows XP SP3. All of my code is in C, and I need to aviod C++ if at all possible.
Nov 19 '08 #3
RedSon
5,000 Recognized Expert Expert
I am running Windows XP SP3. All of my code is in C, and I need to aviod C++ if at all possible.
You can try using process explorer to see what your application is up to, check out this link...

http://technet.microsoft.com/en-us/s.../bb896653.aspx
Nov 19 '08 #4
weaknessforcats
9,208 Recognized Expert Moderator Expert
Don't overlook Task Manager.
Nov 19 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

18
3693
by: jacob navia | last post by:
In C, we have read-only memory (const), read/write memory (normal data), and write only memory. Let's look at the third one in more detail. Write only memory is a piece of RAM that can only be written to, since its contents are undefined. The program is allocating a new piece of data, and the previous contents aren't relevant. This memory
12
2297
by: ira2402 | last post by:
Hi All, We are developing sw for a small embedded OS and we have limited memory. We are looking for algorithms, links, and articles about this. The goal is efficient utilization of small amount of memory - means - allocation for fixed length blocks / variable length blocks. Thanks.
4
16396
by: Sean | last post by:
I am a little bit confused about memory clean up in VB.NET. (Damn I never thought I'd miss News and Deletes from VC++, but at least I was sure there). If I have some code like: Public Function SomeFunction(ByVal count As Integer) Dim Instance as MyClass For i = 0 to count
4
3421
by: Hermann Maier | last post by:
hi, i need to find out the memory usage of a specific function that i use in my program. this function does some recursive calculations and i want my program to display the amount of memory the function used to calculate a specific value. thx
13
6144
by: hurry | last post by:
In order to avoid declaring static variables in a function I was asked to write a scratch memory. Reserve a block of memory outside the function and assigning pointers to the memory locations as per convenience and access them. I was told this would save some memory. I dont understand the logic behind this, as i`ve declared variables as global (assuming i`ve declared the block in main() ) this would always b a residual data for access at...
8
8532
by: Adrian | last post by:
Hi I have a JS program that runs localy (under IE6 only) on a PC but it has a memory leak (probably the known MS one!) What applications are there that I could use to look at the memory usage of each object within my JS app to help locate my problem? Thanks
53
26363
by: fdmfdmfdm | last post by:
This is an interview question and I gave out my answer here, could you please check for me? Q. What are the memory allocation for static variable in a function, an automatic variable and global variable? My answer: static variable in function and global variable are allocated in head, and automatic variable is allocated in stack. Right?
5
24706
by: kumarmdb2 | last post by:
Hi guys, For last few days we are getting out of private memory error. We have a development environment. We tried to figure out the problem but we believe that it might be related to the OS (I am new to Windows so not sure). We are currently bouncing the instance to overcome this error. This generally happen at the end of business day only (So maybe memory might be getting used up?). We have already increased the statement heap & ...
2
2448
by: Lambda | last post by:
I'd like to load a lot of data into a hashtable, when the memory is used up, I'll write the data to a file. I'm trying to use std::tr1::unordered_map to implement that. My question is if I insert too many data into the map, what will happen? Does unordered_map need continuous memory like vector? How to detect that there is no free memory available? Can I limit the amount of memory that is used by a container? And last, is it the right...
6
2085
by: ashjas | last post by:
Hello all.. I am experiencing memory leakes in on of my applications that i am developing. the % of memory used for the application is increasing as shown in the top command on linux. The memory is leaking only when a function is called where i am allocating memory dynamically to a pointer(char string,i,e c-string). if i replace the logic with the use of stl string the memory leaking problem goes off..
0
8449
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8876
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8784
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8556
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8642
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2774
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.