memory

Java OutOfMemoryError due to Linux RAM disk cache not freed

The process will run fine all day, then, bam, without warning, it will throw this error. Sometimes seemingly in the middle of doing nothing. It will happen at seemingly random times during the day. I checked to see if anything else was running on the machine, like scheduled backups or something, but found nothing. The machine has enough ...

My Android game runs out of memory when it is closed and opened and couple times.

I have an Android game that has an activity for the menu, and then another activity for the game that creates a SurfaceView and Thread to deal with canvas drawing and game logic. When you exit the game and start it up again too much or if you open and close the keyboard (thus restarting the activity), the game runs out of memory, usually...

Msbuild consumes memory, hangs creating folder and copying linked files

aHello! My msbuild script (v3.5) has recently started behaving very strange. I build the entire solution at once that has 110+ projects. The build seems to run normal but then gradually slows down to halt with 1hour+ per project and consuming 500+MB memory. It started happening with no apparent reason to be the cause (a code update afte...

Access to a process memory

why do we allocate virtual memory address space within a process to get a read access to its memory? ...

cache memory performance

Hello, i just have a general question about cache memory. How would a program perform badly on a cache based system ? , since cache memory stores adresses from main memory that is requested, aswell as adresses that ranges around the same adress as the one copied from the main memory. ...

PerformSelectorInBackground leaking on device

While it seems to not pose a problem on the simulator, using performSelectorInBackground on the device causes memory leaks. Or at least that's what Instruments indicates. Looking at the code I don't have a single clue what the cause could be. I tried to strip the affected code to a bare minimum but still strangely Instruments keeps show...

Dereferencing deleted pointers always result in an Access Violation ??

I have a very simple C++ code here: char *s = new char[100]; strcpy(s, "HELLO"); delete [] s; int n = strlen(s); If I run this code from Visual C++ 2008 by pressing F5 (Start Debugging,) this always result in crash (Access Violation.) However, starting this executable outside the IDE, or using the IDE's Ctrl+F5 (Start without Debuggin...

Memory leaks in libxml2.2

I am using libxml2 to parse xml content in my iPhone app. The xml content is downloaded from a server similar to the Apple's own TopSongs sample app. When I check for leaks using the Instruments tool, I see memory leaks being reported on xmlNewParserCtxt, xmlNewInputStream and xmlAllocParserInputBuffer. I have called xmlFreeParserCtxt(co...

malloc and obtaining recently freed memory

I am allocating the array and freeing it every callback of an audio thread. The main user thread (a web browser) is constantly allocating and deallocating memory based on user input. I am sending the uninited float array to the audio card. (example in my page from my profile.) The idea is to hear program state changes. When I call mall...

Protecting an Application's Memory From Tampering

We are adding AES 256 bit encryption to our server and client applications for encrypting the TCP/IP traffic containing sensitive information. We will be rotating the keys daily. Because of that, the keys will be stored in memory with the applications. Key distribution process: Each server and client will have a list of initial Key E...

how to check and alert the user if the session object's capacity exceeds the memory .

hi i was working on a application developed in asp & c#.net, i want alert the usersif the session capacity exceeds the memory limit. how can i alert the user if the session object's capacity exceeds the memory . ...

What is String Local Memory in Java ?

In a JVM the memory is split into Method Area ,Stack ,Heap , Temp and Registry . what is String Local Memory ? Does this exists ? If so when does it gets allocated or assigned ? Appropriate Usage of this ? Thanks ...

NSStrings created without alloc, memory leaks

My app is riddled with memory leaks concerning NSString objects. Never, ever do I use alloc to create an NSString object, yet according to Instruments (used with a real device) the app leaks NSString objects. This happens around uses of stringByAppendingString. Example of code: NSString *documentsPathPlusSlash = [self.documentsPath stri...

Global variable not stable after platform changed.

Our embedded system is built on a hw/sw platform made by enea. After the platform updated recently, we found some operations on the global variable keep crashing the system. For example, we have a global map structure holding some data. We can insert/iterate the map once or twice, then the address of the elements in the map suddenly ch...

Strange realloc behaviour

Hi guys, i'm developing an array structure just for fun. This structure, generalized by a template parameter, pre allocates a given number of items at startup, then, if "busy" items are more than available ones, a function will realloc the inner buffer . The testing code is : #include <stdio.h> #include <stdlib.h> #include <string.h> t...

Objective-c for the iphone: Mystery memory leak

My application seems to have 4 memory leaks (on the device, running instruments). The memory leaks seems to come from this code: NSURL *url = [self getUrl:destination]; [destination release]; NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url]; [request setHTTPMethod:@"GET"]; [request addValue:@"application/j...

The right way to manage subviews in a UIControl

(iPhone SDK 3.x:) I have a UIControl subclass that creates a different number of subviews depending on the length of an NSArray property. Please take my word for it that this needs to be a UIControl rather than a UIView. Currently I implement subview management in drawRect, beginning by removing all subviews and then creating the appr...

Is Java serialization a tool to shrink the memory footprint?

Hey folks, does serialization in Java always have to shrink the memory that is used to hold an object structure? Or is it likely that serialization will have higher costs? In other words: Is serialization a tool to shrink the memory footprint of object structures in Java? Edit I'm totally aware of what serialization was intended for...

jQuery, .empty() and memory

Hello, my application (ASP.NET MVC) shows a page which loads data constantly, at certain intervals. The jQuery script calls a controller and this one renders a different partial view, based on certain conditions. This partial view is the appended to the DOM with jQuery; previous elements are removed with the empty() method. $(...

Efficiency: what block size of kernel-mode memory allocations?

I need a big, driver-internal memory buffer with several tens of megabytes (non-paged, since accessed at dispatcher level). Since I think that allocating chunks of non-continuous memory will more likely succeed than allocating one single continuous memory block (especially when memory becomes fragmented) I want to implement that memory b...