memory

Browser Memory Consumtion (FireFox)

I am developing a Web Application. I have the feeling, that the browsers memory consumption is higher than it should be with my application. Is there a way or tool by which I can see what parts do consume the memory of the browser? ...

C++: Can I get out of the bounds of my app's memory with a pointer?

Hi, If I have some stupid code like this: int nBlah = 123; int* pnBlah = &nBlah; pnBlah += 80000; *pnBlah = 65; Can I change another app's memory? You have explained me this is evil, I know. But I was just interested. And this isn't something to simply try. I don't know what would happen. Thanks ...

Firefox Iframe Memory leak

We are working on a JavaScript application that does has been crashing for no reason that we can see. The nature of the application is that it uses javascript to redirect the page every few seconds. and rotates through a number of web pages in a set ammount of time. So in searching for a potential memory leak in our code we set it up t...

Write data in cmd to memory instead of file, catch it with C#

Hi, For a C# project I'm experimenting with ffmpeg to extract a .wav file from a video file (in Windows). You could do this by running it on the command line like this: "ffmpeg -i inputvid.avi + 'extra parameters' + extracted.wav". This obviously extracts the audio from the input .avi file to a specified .wav file. Now, I can easily ...

Reducing unnecessary same values in Class member variables ....

class A { public int a; public int c; } i will create 10 instances from A.Then i will create 15 instances from A again... go on. first 10 instance will have same value for a variable and next 15 instances will have again same value for a.But I don't mean that both group has same values for a .Problem is create same a value 10 times i...

Why does this program take up so much memory?

I am learning Objective-C. I am trying to release all of the memory that I use. So, I wrote a program to test if I am doing it right: #import <Foundation/Foundation.h> #define DEFAULT_NAME @"Unknown" @interface Person : NSObject { NSString *name; } @property (copy) NSString * name; @end @implementation Person @synthesize name; - (v...

Quantifying the Performance of Garbage Collection vs. Explicit Memory Management

I found this article here: Quantifying the Performance of Garbage Collection vs. Explicit Memory Management http://www.cs.umass.edu/~emery/pubs/gcvsmalloc.pdf In the conclusion section, it reads: Comparing runtime, space consumption, and virtual memory footprints over a range of benchmarks, we show that the runtime performan...

Does anyone have any good examples of a .NET program that stays memory resident and runs an action on a timer?

This program should not have a visible window, more like a daemon. (a taskbar program for instance) Any links or advice will be appreciated. ...

How important is managing memory in Objective-C?

Background: I'm (jumping on the bandwagon and) starting learning about iPhone/iPad development and Objective-C. I have a great background in web development and most of my programming is done in javascript (no libraries), Ruby, and PHP. Question: I'm learning about allocating and releasing memory in Objective-C, and I see it as quite a ...

Ways to avoid Memory Leaks in C/C++

What are some tips I can use to avoid memory leaks in my applications? In my current project I use a tool "INSURE++" which finds the memory leak and generate the report. Apart from the tool is there any method to identify memory leaks and overcome it. ...

Android Keep Activity from Dieing

The main Activity I use in my Android application uses a fair amount of memory, meaning that on a less powerful phone, it is susceptible to being killed off when not at the front. Normally this is fine, but it also happens when I am still inside my application, but have a different activity at the top of the stack (such as a preference a...

Exit code 3 (not my return value, looking for source)

Greetings, my program exits with the code 3. No error messages, no exceptions, and the exit is not initiated by my code. The problem occurs when I am trying to read extremely long integer values from a text file (the text file is present and correctly opened, with successful prior reading). I am using very large amounts of memory (...

Designing small comparable objects

Intro Consider you have a list of key/value pairs: (0,a) (1,b) (2,c) You have a function, that inserts a new value between two current pairs, and you need to give it a key that keeps the order: (0,a) (0.5,z) (1,b) (2,c) Here the new key was chosen as the average between the average of keys of the bounding pairs. The problem is, t...

java memory usage

I know I always post a similar question about array memory usage but now I want post the question more specific. After I read this article: http://www.javamex.com/tutorials/memory/object_memory_usage.shtml I didn't understand some things: the size of a data type is always the same also on different platform (Linux / Windows 32 / 6...

Make this C# SwapBytes code x64 compatible

Hi, Here is a piece of code borrowed from the "Endogine" engine. It is supposed to swap the byte order of any byte array : unsafe protected void SwapBytes(byte* ptr, int nLength) { for(long i = 0; i < nLength / 2; ++i) { byte t = *(ptr + i); *(ptr + i) = *(ptr + nLength - i - 1); *(ptr + nLength - i - 1) = t;...

Application Servers(java) : Should adding RAM to server depend on each domain's -Xmx value?

We have Glassfish application server running in Linux servers. Each Glassfish installation hosts 3 domains. Each domain has a JVM configuration such as -Xms 1GB and -XmX 2GB. That means if all these three domains are running at max memory, server should be able to allocate total 6GB to the JVMs With that math,each of our server has 8GB ...

Reed-Solomon encoder for embedded application (memory-efficient)

Hi I am looking for a very memory-efficient (like max. 500 bytes of memory for lookup tables etc.) implementation of a Reed-Solomon encoder for use in an embedded application? I am interested in coding blocks of 10 bytes with 5 bytes of parity. Speed is of little importance. Do you know any freely available implementations that I can ...

How UIWindow#addSubview can make memory leak?

Hello, I started to learn using Instrument, but I cannot figure it out. After I start my application, the UI shows up, I do nothing and after few seconds I can see memory leak detected: When I have a look at the second leak I can see the following stack: When I double click on the cell related to my code I can see that it is pointin...

C++: Allocation of variables in a loop

Let's say I have a loop like this: vector<shared_ptr<someStruct>> vec; int i = 0; while (condition) { i++ shared_ptr<someStruct> sps(new someStruct()); WCHAR wchr[20]; memset(wchr, i, 20); sps->pwsz = wchr; vec.push_back(sps); } At the end of this loop, I see that for each sps element of the vector, sps-...

C++/Qt - Memory allocation question

Hello! I recently started investigating Qt for myself and have the following question: Suppose I have some QTreeWidget* widget. At some moment I want to add some items to it and this is done via the following call: QList<QTreeWidgetItem*> items; // Prepare the items QTreeWidgetItem* item1 = new QTreeWidgetItem(...); QTreeWidgetItem* ...