memory

DLLs, memory mapping, base address, memory usage, and .NET?

Before I start with the real question, let me just say that I might get some of the details here wrong. If so, please arrest me on those as well as, or even instead of answering my question. My question is about DLLs and .NET, basically. We have an application that is using quite a bit of memory and we're trying to figure out how to mea...

how to find out which processes are swapping in linux?

Under Linux, how do I find out which process is using the swap space more? Any scripts/links appreciated.. ...

iPhone development - memory release issue

Hi I am running into this issue of releasing an already released object but can't for the life of me find out where the error is taking place. I have added NSZombieEnabled flag and this is the log I get in gdb. Can someone please tell me how to go about resolving this issue or rather finding out where the error occurred. *** -[CFString...

Recursive Class Instance Size in Delphi

Is there a way to get the actual size of a class instance in Delphi? I know about the InstanceSize method of the TObject class but that method does not recursively invokes itself for object members. For example, let's say we have two classes: type MyClass1 = class private myVar1 : integer; myVar2 : integer; end; type MyClass...

Where is the content of a java piped stream 'stored' ?

I am running my application under a profiler. The 'class' that has the most memory consumption is the 'char[]' which is about 10kB in my application. I then created an InputStream (PipedInputStream to be exact) which holds a byte array data of 300MB. Then I took a look at my profiler, and I don't see any significant change ( don't see...

Memory leak while using Threads

Hello. I appear to have a memory leak in this piece of code. It is a console app, which creates a couple of classes (WorkerThread), each of which writes to the console at specified intervals. The Threading.Timer is used to do this, hence writing to the console is performed in a separate thread (the TimerCallback is called in a seperate t...

c# reference variable mem allocation

Hi, Does anyone know how much memory is taken up when you create a reference type variable? String s = "123"; How much memory would 's' take up as a reference, not the data pointing to it? ...

iPhone Development - Simulate Memory Warning

Background: I have a tab bar application. Each tab contains navigation controller allowing the user to transition from one view to the other showing a drill down information of the data (each view is being handled by a view controller and each view controller class has -didReceiveMemoryWarning method). Lists are populated by pulling the ...

how to get the memory used by a java process in java

Hi, I am running JBOSS server by deploying my own classes.Now i started doing some operations on my application.Now i would like to know the memory used by my application before and after performing operations.please support me in this regard ...

How do I reconcile 'top' and 'free -m''s memory usage reporting in linux?

From free -m i can see that there is 377MB of memory used and 1649MB free on the machine(Of which 1567 is cached by ubuntu). See below for the actual output: caz@riskvm:~$ free -m total used free shared buffers cached Mem: 2026 1975 51 0 30 1567 -/+ buffer...

Most efficient replacement for IsBadReadPtr?

I have some Visual C++ code that receives a pointer to a buffer with data that needs to be processed by my code and the length of that buffer. Due to a bug outside my control, sometimes this pointer comes into my code uninitialized or otherwise unsuitable for reading (i.e. it causes a crash when I try to access the data in the buffer.) ...

BlackBerry memory usage

Hi, I am looking for some advice on memory usage on mobile devices, BlackBerry in particular. Using some profiling tools we have calculated a working set size in RAM of 525kb. Problem is we don't really know whether this is acceptable or too high. Can anyone give any insight into their own experience with memory usage on BlackBerry? Wh...

Storing Data In Memory: Session vs Cache vs Static

A bit of backstory: I am working on an web application that requires quite a bit of time to prep / crunch data before giving it to the user to edit / manipulate. The data request task ~ 15 / 20 secs to complete and a couple secs to process. Once there, the user can manipulate vaules on the fly. Any manipulation of values will require...

do all local variables go on the stack

what is the memory overhead on the stack and heap of A versus B A: private string TestA() { string a = _builder.Build(); return a; } B: private string TestB() { return _builder.Build(); } ...

How to enable NSDebugEnabled/NSEnableAutoreleasePool on iPhone

There are environment variables you can set to help debug memory issues on the Mac, but how do you set the environment variables or enable these flags described in NSDebug.h for iPhone development? NAME OF ENV. VARIABLE DEFAULT SET TO... NSDebugEnabled NO "YES" NSZombieEnabled ...

Moving objects inside arrays

Hello! I'm trying to make a Tetris-like game in XNA, and currently I'm thinking of what way would be the best to handle it. This is what I have so far: I have a class called Block, which has for example texture and color tint. Then I was planning on having everything in a double array, like: Block[,] blocks = new Block[10,20]; which...

Big XML file and OutOfMemoryError

Hello, I’m trying to parse a XML file up to 500 mb in java. I tried to use SAX but it gives me this error java.lang.OutOfMemoryError: Java heap space at com.sun.org.apache.xerces.internal.util.XMLStringBuffer.append(Unknown Source) Can you help me? Thanks a lot. P.S. Smaller XML files works just fine ...

Is it safe to reuse pointers variables after freeing what they point to?

Is it safe and predictable to reuse pointers after freeing the data they point to? For example: char* fileNames[] = { "words.txt", "moreWords.txt" }; char** words = NULL; int* wordsCount = NULL; for ( i = 0; i < 2; ++i ) { data = fopen( fileNames[i], "r" ); words = readWords( data ); wordsCount = countWords( words ); f...

RE: Big XML file

Followup question to Big XML File: First thanks a lot for yours answers. After… what I do wrong? This is my class which uses SAX: public class SAXParserXML extends DefaultHandler { public static void ParcourXML() { DefaultHandler handler = new SAXParserXML(); SAXParserFactory factory = SAXParserFactory.newInstance(); ...

Finding a Memory Bubble

This is either ridiculously simple, or too complex . . . . In our application there is a form that loads some data from the database and displays it in the grid (putting it simply). When the data is refreshed the total memory usage climbs by about 50K (depending on how much data is displayed no doubt). Sounds like a memory leak, but w...