memory-usage

C#: List all processes and their current memory & CPU consumption?

Hello, how can I get a list of all processes in C# and then for each process current memory and CPU consumption? Sample code is highly appreciated. Thank you! ...

Do I conserve memory in MATLAB by declaring variables global instead of passing them as arguments?

I am new to MATLAB, it wasn't in the job description and I've been forced to take over for the person who wrote and maintained the code my company uses. Life's tough. The guy from which I'm taking over told me that he declared all the big data vectors as global, to save memory. More specifically, so that when one function calls another ...

.NET Object Executable Instructions Memory Consumption?

Hello Does anyone know if and object's executable code/instructions that are stored in memory by the CLR when creating it are stored once for every instance of such object? Or they are duplicated for each created instance? In other words, does the CLR stores once the Executable Instructions of an object and reuses that for every instan...

Getting CPU usage stats from C on Solaris 10.

On Solaris 10, and in C, I'd like to regularly query numbers like The CPU usage for specific LWPs within that OS process. The memory usage for that OS process. I already know how to do the latter by opening /proc/pid/psinfo and reading from that (pr_rssize), but is there a way to implement the former? In the past I have forked off...

Any approach to peek memory data structure of C/CPP application?

... like how many memory consumed by what / how many objects, as in JVM heap dump file. Our service process is consuming remarkable memory, which is being complained by others living in a same OS. The applications structure is weird, it leveraged reverse JNI to call java interface from c++ code, also it's a network application, all thes...

iPhone dev - In didReceiveMemoryWarning or every time

In a multi-view application, do you think its better to let views automatically get unloaded in memory tight situations, or to actually only ever have one View Controller allocated at a time, and when you switch views, the new one is created, the old one removed, the new one adde d and the old one released. Deallocating every time also m...

A simple C++ question on memory usage

What is the difference (memory wise) bewteen: for(int x=0;x<100;x++) { int y = 1+x; } and int y = 0; for(int x=0;x<100;x++) { y = 1+x; } I've always wondered if they are the same or the first is a waste of memory?... ...

iPhone memory management Question

Hi , i m new to iPhone programming. i am very confused... plz help .. i have a list of questions. 1. - (void){ ClassOne *ob = [[ClassOne alloc] init]; // do i should use autorelease here ? self.O = ob; [ob release]; // is this correct ?? } or -(void)dealloc{ [O release]; // is this correct ?? } which one will release ob ?...

C# 2k8 reduce memory usage (simple app takes 10 MB)

Hello I have a simple C# 2008 application which displays a png-picture and handles some simple MouseEvents. Although it's nothing complex, it uses at least 9.5-10 MB of memory (as shown in task-manager) I've already disabled any type of error logging as well as I removed debug and trace symbols. "Optimize Code" is activated. Is ther...

SQLDeveloper using over 100MB of PGA

Perhaps this is normal, but in my Oracle 11g database I am seeing programmers using Oracle's SQL Developer regularly consume more than 100MB of combined UGA and PGA memory. I'd like to know if this is normal and what can be done about it. Our database is on the 32 bit version of Windows 2008, so memory limitations are becoming an incre...

How to get current CPU and RAM usage in VB 6?

Hi, how to get the CPU and memory usage in VB 6 code? Thanks! ...

Doctrine query memory usage

Doctrine appears to be taking well over 4MB of RAM to execute a single, simple query: print memory_get_peak_usage()." <br>\n"; $q = Doctrine_Query::create() ->from('Directories d') ->where('d.DIRECTORY_ID = ?', 5); $dir = $q->fetchOne(); print $dir['name']." ".$dir['description']."<br>\n"; print memory_get_peak_usage()." <br>\...

How to log/pinpoint which PHP script uses a lot of memory? Optimization Question

Hello, I wrote a small app that turns out to be using a lot of memory when used by a few users simultaniously. This is leading to some Fatal PHP errors and some mySQL (errcode 12) errors. My Plesk QoS page shows frequent 'kmemsize' black zone errors. My question is: What's the best method to monitor PHP script runs to pin-point which ...

XElement vs Dcitionary

Hi All, I need advice. I have application that imports 10,000 rows containing name & address from a text file into XElements that are subsequently added to a synchronized queue. When the import is complete the app spawns worker threads that process the XElements by deenqueuing them, making a database call, inserting the database output ...

How much memory does a Hashtable use?

In Java, if I create a Hashtable<K, V> and put N elements in it, how much memory will it occupy? If it's implementation dependent, what would be a good "guess"? ...

Why does .NET use so much CPU, is this a problem?

(This was meant to be a general hypothetical question, me whining that .NET was a pig and begging for reasons. It was not really meant to be a question about my specific app.) Currently I am rewriting some old C++ code in C#. We are porting over all legacy applications. I have C++ applications that take MAX 3% CPU. Mostly they use none....

Using Xcode 3.2, which performance tool to see how much memory my iPhone app is using?

Also, is running an app in the simulator sufficient to get a ball park estimate or will I get very different values from running on the device? ...

Monitoring memory consumption by different java objects

If we have 300 classes in an application, is it possible to monitor how many instances of each class we have at a given time? Is it possible to know how much memory each instance is consuming? Thanks ...

Help me understand these memory statistics from Process Explorer

I'm trying to do a very rough measurement of the amount of memory my large financial calculation requires in order to run. Its a very simple command line tool which prices up a large number of financial instruments and then prints out a result. I decided to use Process Explorer to view the memory requirements of the program. Can somebo...

How to restrict the memory usage of Java application packed in a jar (-Xmx doesn't seem to work) on Windows

Hi, I'd want to restrict the maximum heap size for a Java application but it doesn't seem to work. I'm running the application from a jar package through bat in Windows. Bat contents: @Echo off set CLASSPATH=. java -Xmx32m -classpath %CLASSPATH% -jar MyApplication.jar This should restrict the maximum heap size of 32 megabytes. Howeve...