memory

Does Rails load all installed gems?

When Rails loads, does it load all the gems that are installed on the system? I've got 47 gems installed on the server, including all the various Rails gems which have multiple versions. However, both Rails, and all the gems used by the application, are frozen into the application. Are all those gems getting loaded, and would that cause...

Pass 'value type' on stack by ref - memory footprint

What happens in memory when we pass a value type - which has been stored on the stack - by reference? A temp value/pointer must be created somewhere to change the origninal value when the method completes. Could someone please explain or point me to the answer - lots of stuff on memory but none seem to answer this. ty ...

How Can I Empty the Used Memory With Python ?

I have just written a .psf file in Python for executing an optimization algorithm for Abaqus package, but after some analysis it stops. Could you please help me and write Python code to free the memory? Thanks ...

In-memory size of python stucture

Does someone know of a good reference card for the memory size of python data stucture on 32 and 64 bit platforms ? If not, this would be nice to have it on SO. The more exhaustive the better ! So how many bytes are used by those python structures (depending on the len and the content type when relevant) ? - int - float - reference...

What Happens When Stack and Heap Collide

Hi, I am curious to know what happens when the stack and the heap collide. If anybody has encountered this, please could they explain the scenario. Thanks in advance. ...

Interesting observation with IE memory management and javascript

In windows, when an application is minimised the OS frees up memory associated with application by placing the data within a page file. Other garbage collection may also execute. In the case of internet explorer running my javascript app I find that if the memory usage starts at 60mb then minimising the browser reduces the memory to 17...

Is the memory of a (character) array freed by going out of scope?

Very much related to my previous question, but I found this to be a separate issue and am unable to find a solid answer to this. Is the memory used by a (character) array freed by going out of scope? An example: void method1() { char str[10]; // manipulate str } So after the method1 call, is the memory used by str (10 bytes) fre...

Memory report confusion shown by top and htop commands?

I'm on Slicehost 256 plan running one single Rails app on Ubuntu Hardy 64 bit server. This is the shot taken using top command sorted by memory% (Shift+M) And this is the screenshot taken while running htop command sorted by memory% used. The memory consumed by mysql using top shows 3.8% but the htop shows around 17 processes each e...

How to completely unload view controller loaded from nib?

I'm writing iPhone application which uses multiple views, each with own controller. They are loaded programmatically using initWithNibName: and released before switching to other controller, so only one view is visible at a time. After releasing view controller (I have checked that dealloc is called) not all memory is freed. I do release...

.NET memory leak?

I have an MDI which has a child form. The child form has a DataGridView in it. I load huge amount of data in the datagrid view. When I close the child form the disposing method is called in which I dispose the datagridview this.dataGrid.Dispose(); this.dataGrid = null; When I close the form the memory doesn't go down. I use t...

Allocating memory for NSString?

I am new to Objective-C and I am a little curious about how I should be managing the memory for the local NSString variables shown below and the associated instance variables inside the class object. The code I have works fine, but just curious as to best practice. Edited to include full code, nothing special, like I say I am just curio...

Find info from address in debugging

Hi, I am learning to solve some runtime error with gdb. Here are my questions: when runtime error happens because some access operations of some memory is conflicted, can I find out in the dumped core the address of that memory? Given an address, is it possible to find out which variable is using it (the address may be at the begining...

Reducing memory usage of .NET applications?

I was wondering if anyone had any tips to reduce the memory usage of .NET applications. Consider the following simple C# program: class Program { static void Main(string[] args) { Console.ReadLine(); } } Compiled in release mode for x64 and running outside visual studio, the task manager reports the following: Wor...

Unmanaged memory and Managed memory

what exactly these unmanaged and managed memory is? can anybody explain me in brief? ...

How to make a .NET application "large address aware"?

Assuming I have booted a 32-bit Windows Server with the /3GB switch, how can I make a .NET application use the additional address space? ...

Java memory allocation performance (SunOS vs Windows)

I have a very simple unit test that just allocates a lot of Strings: public class AllocationSpeedTest extends TestCase { public void testAllocation() throws Exception { for (int i = 0; i < 1000; i++) { long startTime = System.currentTimeMillis(); String a = "dummy"; for (int j = 0; j < 1000; j++) { a ...

Visual Studio 2008 crawling after long idle time

What's up people. Something's been bothering me for a while now... and I was wondering if any of you might know of a workaround for this. The C# solution im working on is a huge solution that contains about 20 projects and almost the same amount of unit test projects. Each projects contains hundreds of files. So opening and closing the...

Setter for NSString, how is it working?

This question follows on from a previous question, that has raised a further issue. What I am trying to understand is just when the pointers and object in this example are being created and what ultimately happens to them. I am still trying to get my head round this, so please excuse any false assumptions I may have made. // MAIN int ma...

How to show a big image on the iPhone (without overflowing the memory)?

Hi, I have an application that let's users view images. The user decides what images to use, so the size can range from 10x10 to 10000000x10000000 (I am exeggerating). All is well up to a certain size, when the image is bigger than the iPhone's memory. Quite understandably. But how do I fix it? Is there a way to load only a portion of ...

ARM9 SVC_STACK out of range?

I'm debugging some odd ARM exceptions in an embedded system using the IAR workbench toolchain. Sometimes, when an exception is trapped the SVC_STACK is reported as out of range (very out of range!) Is this relevant, or just an artifact of the J-Link JTAG debugger? What is the SVC_STACK used for? It is set to 0x1000 size, but when it is o...