memory-usage

How to find the source of increasing memory usage of a twisted server?

I have an audio broadcasting server written in Python and based on Twisted. It works fine, but its memory usage is increasing when there are more users on server, but the memory usage never goes down when those users get off line. As you see in following figure: You can see the curve of memory usage goes up where the curve of listener...

error installing packages in Minix

this is the error Out of i-nodes in device 3/130 I have booted Minix using qemu 1Gb(Gigs) partition is allocated when trying to install a few packages using packman and then selecting some numbers, it continued and installed some, then gave this error. I doubt it is memory shortage, but please tell if there is any methods to know t...

How to Remember Storage Size of .NET Data Types?

In .NET framework, Knowing how much each data types consumes memory is useful, but it's so forgettable. Is there any way to remember it? If I know for example, that the int data type consumes 4 bytes, it's useful. But this kind of data are so forgettable specifically when I use other software such as SQL Server that memory consumption t...

Does a variable in occupy the same space in memory as when serialized?

if the class was had a SerializableAttribute and its object was serialized with BinaryFormatter, the serialized size is equal to the size it occupied in memory? Edit: Additional question: is there a better way to find how much space an object occupies in the memory? is this method approximate enough? ...

How much session data is too much ?

We are running into unusually high memory usage issues. And I observed that many places in our code we are pulling 100s of records from DB, packing it in custom data objects, adding it to an arraylist and storing in session. I wish to know what is the recommended upper limit storing data in session. Just a good practice bad practice kind...

Xcode Instruments: peak RAM of iPhone apps running in Simulator?

Is Activity Monitor (a.k.a. Memory Monitor) the only tool in Xcode Instruments that can measure the total app RAM usage of an iPhone app running in Simulator? Just that line showing momentary wired RAM? And how accurate is that versus iPhone hardware, especially given OSX paging i/o to VM? I'm seeing 7-8MB wired RAM figures for just th...

Which counter can I use in performance monitor to see how much memory is waiting for the GC?

I am trying to profile a specific page of my ASP.NET site to optimize memory usage, but the nature of .NET as a Garbage Collected language is making it tough to get a true picture of what how memory is used and released in the program. Is there a perfmon counter or other method for profiling that will allow me to see not only how much m...

How to find the memory used by any object

class Help { public: Help(); ~Help(); typedef std::set<string> Terms; typedef std::map<string, std::pair<int,Terms> > TermMap; typedef std::multimap<int, string, greater<int> > TermsMap; private: TermMap terms; TermsMap termsMap; }; How can we find the memory used (in bytes...

Java memory usage difference between Linux and Windows

When running the same java process (a jar) under Windows and Linux (Debian) the Linux proces uses a lot more (12MB vs 36 MB), just from starting up. Even when trying to limit the heap size with -Xmx/Xms/etc, it stays the same. Nothing I try seems to help and the process always takes 36 MB. What explains this difference between Linux and ...

C# Dictionary and Efficient Memory Usage

I have a tool to compare 2 csv files and then bucket each cell into one of the 6 buckets. Basically, it reads in the csv files (using fast csv reader, credit: http://www.codeproject.com/KB/database/CsvReader.aspx) and then creates a dictionary pertaining to each file based on the keys provided by the user. I then iterate through th dicti...

Tips For Dealing With Huge RAM Working Sets

I am working on a .Net 3.5 application designed specifically for a high-powered PC that does lots of data manipulation and computation. I recently encountered a need for a 4000 x 5000 two-dimensional array of objects, which is very large for a 32-bit PC and will give me an OutOfMemoryException. The only way to avoid using an array like t...

Drupal sudden excessive memory usage

I'm running my drupal website on a VPS, the server suddenly stops responding and the stats shows a sudden excessive memory usage. I'm not sure if it's Drupal, but my database is hosted on another server. Can anybody help in this? ...

Using session to store uploaded files

Is it safe and recommended to store larger uploaded files in asp.net session (httpsessionstate) ?. In this scenario session would be used as a temporary storage for multiple file uploads and later files would be transferred to disk/db and session cleared out. ...

Android: Eclipse MAT does not appear to show all my app's objects

I have created an hprof file by inserting the statement Debug.dumpHprofData("/sdcard/myapp.hprof"); in my app's code; I have then run the hprof file through hprof-conv and opened the converted file in Eclipse. Following the advice of the MAT "Cheat Sheet" I have obtained an analysis of my app's memory usage by going to "Leak Identificat...

How to measure memory used in a block or program with C++

What is the best way to measure the memory used by a C++ program or a block in a C++ program. The measurement code should thereby be part of the code and it should not be measured from outside. I know of the difficulty of that task, so it does not have to be 100% accurate but at least give me a good impression of the memory usage. ...

Total and allocated heap on Windows Mobile when using Large Memory Area

I have a Windows Mobile 6.1 application which allocates memory not just from the 32MB process space but also from Large Memory Area - LMA (slot 60 and above). MEMORYSTATUS structure gives me memory usage information of 32MB process slot only. Is there a way to compute total heap available from the system and allocated heap by the applic...

Why does my RSS grow with stack allocated memory

I have written a small server application. It stores a lot of data in strings. When stresstesting it, RSS memory grows (spotted by $top). I have ran the program through "Instrument" - Mac OS X memory leak applicaton and it find only some minor leaks - the memory leaked was a couple of hundred bytes and the program continuously grows. Wh...

Unexpected heap usage in J2EE Struts app

I am having few queries regarding heap usage in my app. At instances it is observed that user activity is minimal (or nil ) on weekend but heap usage increases linearly, reaches the threshold causing the GC to kick in. I wish to analyze the cause of this heap usage and confirm if this is normal and expected. Assuming no user activity, th...

Encoding Large Object Graph Using NSKeyedArchiver Eats Memory

I'm using a NSKeyedArchiver to encode a big object graph (76295 objects.) It takes a lot of time but even worse the NSKeyedArchiver doesn't give back all its memory. After using the Leak check, the code doesn't appear to leak at all but for some reason the encoding doesn't give back all memory after it's done. Calling the encode method...

data section in C++

Hi, I have a question to clarify my confusion about the memory organization in computer in C++. In C++, different data is put in different location. My understanding is like this. 1) data segment section, where global and static data are located; 2) heap section, the objects created by new 3) stack section, the...