memory

how to clear a object from memory using javascript .

this is the demo code : function a(){ this.a='aaa' } var aa=new a how to clear the aa object from the memory thanks ...

Memory use visual monitoring

Hi! I'm developing a software in C that uses a lot of memory and I need to monitor this. I know netbeans has this option but it needs Sloaris Studio. Do you know some grafical tool to watch the use of memory, CPU and is possible I/O? How do you usually do this things? PD: I know valgrind to search for memory leaks, but I'm searching s...

Allocate Virtual memory before running out of RAM

is it possible, in a C/C++ program, to allocate virtual memory (Swap Space) for an specific array, so that the program keeps using RAM for the rest of variables, and maybe getting some benefit at some type of problems?? ...

Android How do you get total memory RAM in the device?

I can get total available memory by: ActivityManager activityManager = (ActivityManager) getSystemService(ACTIVITY_SERVICE); MemoryInfo memoryInfo = new ActivityManager.MemoryInfo(); activityManager.getMemoryInfo(memoryInfo); memoryInfo.availMem; However, how do you get Total memory (RAM) of the device? I did read: http://stackoverfl...

Zombie kills my App

I'm implementing asynchronous image loading in UITableView, If I scroll rows fast my app crashes due to message sent to zombie... What is wrong am I doing here? //loading image from URL -(void)loadImageFromURL:(NSURL*)url { if (connection!=nil) { [connection release]; } //data is NSMutableData if (data!=nil) { [data release]...

Finding amount of RAM using C++..

How would i find out the amount of RAM and details about my system like CPU type, speed, amount of physical memory available. amount of stack and heap memory in RAM, number of processes running. Also how to determine if there is any way to determin how long it takes your computer to execute an instruction, fetch a word from memory (wit...

Are the texture buffers flushed when an OpenGL ES (iPhone) context gets deallocated?

Or I have to glDeleteTextures, glDeleteTextures one by one them? Or is there some kind of glDeleteAllTextures like function? ...

JavaScript function's memory size

This seems rather obvious to me, but I just wanted to make sure. In terms of memory used when the foo function is stored, would it better to do this: function foo(){ var hey = {}; hey.a = 1; hey.b = 1; alert('done'); } or function foo(){ var hey = getHey(); alert('done'); } function getHey(){ var hey = {};...

Android - Reduce the memory usage of Bitmap Drawables

I have a map in my application that shows locations from Gowalla. I use an ItemizedOverlay with a simple default marker, but as the items are drawn, I swap the default marker out with the location's icon downloaded 9and cached on disk) from Gowalla. The problem is that if there are a lot of locations on screen (say 30), the size of the...

Determine who is holding onto an object

In Objective-C, is there any way to find out which objects are the ones retaining another object? For example, I have a collection of MyClass objects and if I iterate through them to get the retain count on each object, I see the count at 2. How can I find out who the holders are? for (NSString *aKey in aDictionaryOfMyObjects) { MyC...

php memory overflow multi curl

Hi all, I have a PHP routine that I call shell_exec to traverse my own website and build an index. However since I do this multi-threaded I have been running into problems with memory storage...server memory spikes to 250MB then back down to 100MB randomly. I am constantly accessing the mysql database during this time; and the php sl...

PHP memory_get_usage

Hello! I came across the PHP's memory_get_usage() and memory_get_peak_usage(). the problem is that I found that these two functions do not provide the real memory used by the current script. My test script is: <?php echo memory_get_usage(); echo '<br />'; $a = str_repeat('hello', 100000); echo '<br />'; echo memory_get_usage(); ...

Tips for finding and debugging abandoned memory and heap growth

I recently watched one of the WWDC 2010 videos: Session 311 - Advanced Memory Analysis with Instruments. The link is here. There is an interesting example in the video on finding Abandoned Memory. They say that it is often more important to debug than leaks but can be more difficult. Abandoned Memory is defined as "Accessible allocate...

Selenium RC memory leak

Im trying to run Selenium RC with Nagios3. Everything works ok up to 3h... then selenium engine takes sometimes even 1.4G RAM and stop responding. I'm starting selenium by: java -server -Xss64k -Xms512m -Xmx1024m -Xverify:none -XX:+UseAdaptiveSizePolicy -XX:+PrintGCDetails -XX:MaxPermSize=160m -XX:+UseParallelGC -jar /usr/local/selen...

Am I releasing memory correctly?

I have the following helper object: LikeHelper* likeHelper = [[LikeHelper alloc]init]; likeHelper.delegate = self; [likeHelper performLike:self.messageID]; [likeHelper release];likeHelper=nil; performLike will do some NSURLConnection stuff and then tell the delegate whether or not it was successful. #pragma mark LikeHelperDelegate Me...

How to detect X-Accel-Redirect (Nginx) / X-Sendfile (Apache) support in PHP?

Hi All, About Application I am working on an e-commerce application in PHP. To keep URL's secure, product download links are kept behind PHP. There is a file, say download.php, which accepts few parameter via GET and verifies them against a database. If all goes well, it serves file using readfile() function in PHP. About Problem Now...

killing activity on Android doesn't clear memory??

I have a game running on android. basically, it's structure is like lunarlander I started my activity , using the layout to start the class running. <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> ...

Dealing with Large Bitmaps (tiling a small bitmap to create wallpaper)...

I'm having memory problems and think it might have to do with creating large bitmaps. The task at hand is to get a fairly small tile image and create a larger tiled image and set this as the phone wallpaper. The way I'm doing this is: 1) Create a view that is 2 * screen width, 1 * screen height 2) Set the view background to a ...

Allocating memory to pointer structures inside structures

If I have a structure such as typedef struct _people { char *name; bool *exists; struct _people **citizens; } PEOPLE; How do I go about allocating memory so that people->citizens[0]->name is accessible? I've tried info->citizens = malloc(sizeof(PEOPLE *)*numbPeople); However when I try to access info->citizens->name I get th...

What to do when my app receives memory warning?

What should I do when my app recieves a memory warning? ...