memory

memory problem with google map and overlays !

Hi all. I am drawing some overlays on google map. If i move around the map too much, I get this error : 10-15 14:43:43.020: ERROR/dalvikvm-heap(299): 32768-byte external allocation too large for this process. 10-15 14:43:43.020: ERROR/GraphicsJNI(299): VM won't let us allocate 32768 bytes 10-15 14:43:43.260: ERROR/AndroidRuntime(299): ...

How to tell how close your activity is to reaching its memory limit?

I'm writing a graphic design application for Android where the user can add several images to a document, where each image is stored as a Bitmap object. Each bitmap has roughly a dimension of 800x400 pixels and uses ARGB8888 pixel format (i.e. ~1.5Mb each). I'm aware that most of the first generation Android devices have a 16Mb heap lim...

Why won't my value increment? Memory stomping/stack glitch?

I've come across a rather charming bug that I'm trying to wrap my head around. I feel like I've seen this before, but this time I want to understand why this is happening. I have: int i; int debug = 0; for(i = 0; i < buf_end; i++) { do_some_buffer_work(); if(something_is_true()) { do_something_important(); pr...

Are these kinds of analysis for efficient use of stack frame memory slots possible ?

I know a compiler may detect life-time of different variables of a function and use the same stack frame slot for some different variables if it detects at beginning of life-time of each one of them life-time of previous variables has ended; but in case of local objects of classes in a function may it analyze life-time of members individ...

[LeavesView Class] NSArray leaking with alot of images

I am using the LeavesView Class available on GitHub by Tom Brow. On the iPad, I have 23 images at 1024x768 ranging from 200-500KB (JPG's). I have compressed the images as much as I could without losing quality. For some reason, when I init with the list of images, the memory drops significantly, and ultimately crashes. Here's some code...

iPhone - substringToIndex / substringFromIndex / substringWithRange memory leak

Instruments leaks says that this code leaks: NSString *name = [file substringToIndex:i]; Layer *actualLayer = nil; for (Layer *lay in layers) { if ([lay.layerName isEqual:name]) { actualLayer = lay; } } name is the leaking object. There are some strange things: it only leaks sometimes, not always (this snippet of code ...

Static effect on memory

Static effect on memory how much ? ...

Ram not working in dual dynamic paging mode

My motherboard is Intel D865GVHZ I m using 512 mb ram and recently i purchased a 512 mb ram of same company same speed(333) and same manufacturer. but my pc is not booting in dual dynamic paging mode . It is not at all booting and the screen freezes on windows logo screen at start up. i checked installing individual rams one by one an...

Checking for nil before releasing an object

Is this good or bad practice? if (!theConnection && !receivedData) { // release the connection, and the data object [theConnection release]; // receivedData is declared as a method instance elsewhere [receivedData release]; } ...

Uploading files with asp.net FileUpload. Buffering to disk before filling up memory?

System.Web.UI.WebControls.FileUpload uses a FileInputStream when uploading files. Does this store everything in memory when uploading or does it start writing to disk after a certain buffer size has been filled? I know it used to work like that years ago, but I would think that has changed now... Can't find it in the docs though. ...

How to release the elements of an NSArray, loaded by arrayWithContentsOfURL ?

I am too dumb to know the answer to this one - does anyone know the answer definitively? NSMutableArray *happyDictionaryEntries; @property (nonatomic, retain) NSMutableArray *happyDictionaryEntries; -(void) getStuffFromServer { .. self.happyDictionaryEntries = [NSMutableArray arrayWithContentsOfURL:[NSURL URLWithString:aUrl]]; } ...

SIGKill Without warning or stack trace with NSLogv

I know this is a somewhat vague question, but during debug execution, the app I'm working on dies without any stacktrace or warning and with simply this message in the debug console: Program received signal: “SIGKILL”. I have NSZombieEnabled, NSDebugEnabled, MallocStackLoggingNotCompact and MallocStackLogging all set within XCode....

.NET Application Memory usage grow over time, memory leak or not?

I wrote a .NET application where memory usage is growing over time. As a test, I set it up to download 800 * 5K (average) size files and doing XML transform and using DTComcontroller to generate manifest, inside 1 hour with an interval of 15 Minutes. During a period of about 5 hours, memory usage grows from 35M to about 70M. Not sure if...

how to check the Variable is or not in the Memory using javascript .

i want to check the marker(google maps v3) is or not in the Memory when i zoom in map and can't see them . so what can i do , ...

will compiler reserve memory for this object?

I have following two classes: template <size_t size> class Cont{ public: char charArray[size]; }; template <size_t size> class ArrayToUse{ public: Cont<size> container; inline ArrayToUse(const Cont<size+1> & input):container(reinterpret_cast<const Cont<size> &>(input)){} }; I have three following lines of code at global scope: c...

How to mitigate host + device memory tranfer bottlenecks in OpenCL/CUDA

If my algorithm is bottlenecked by host to device and device to host memory transfers, is the only solution a different or revised algorithm? ...

My preallocation of a matrix gives out of memory error in MATLAB

I use zeros to initialize my matrix like this: height = 352 width = 288 nFrames = 120 imgYuv=zeros([height,width,3,nFrames]); However, when I set the value of nFrames larger than 120, MATLAB gives me an error message saying out of memory. The original function is [imgYuv, S, A]= changeYuv(fileName, width, height, idxFrame, nFram...

Will this code leak memory?

I am calling in applicationDidFinishLaunching: [self performSelectorInBackground:@selector(performReachabilityCheck) withObject:nil]; Here is the performReachabilityCheck -(void)performReachabilityCheck{ internetReach = [[Reachability reachabilityForInternetConnection] retain]; [internetReach startNotifer]; [self updateInt...

NSZombieEnabled won't turn off

I have NSZombieEnabled to NO in my arguments. I am checking to see if it is enabled: if(getenv("NSZombieEnabled") || getenv("NSAutoreleaseFreedObjectCheckEnabled")) { NSLog(@"NSZombieEnabled/NSAutoreleaseFreedObjectCheckEnabled enabled!"); } My debugger says it is still enabled. Why? ...

C#/.NET: UnmanagedMemoryStream for networking?

I was considering using UnmanagedMemoryStream rather than MemoryStream for dealing with incoming (and perhaps outgoing?) packets in a network server. What I hope to achieve is less copying of values, and if possible, avoid copying to the heap (too much). For example, for an incoming packet, one could do: fixed (byte* p = &data) // wher...