memory-usage

Actors Mailbox Overflow. Scala

Im currently working with two actors in scala. One, the producer, produces some data and sends it to a parcer. The producer sends a HashMap[String,HashMap[Object,List[Int]]] through a message (along with this to mark the sender): parcer ! (this,data) The parser is constantly waiting for messages like so: def act(){ loop{ re...

Silverlight Smooth Streaming Client Memory Usage

The sample Smooth Streaming Client provided here continues to grow in memory until it fails out with an Out of Memory Exception. Our version is using Silverlight 3 and we have tried the Beta 2 and TRW 1 versions of the Smooth Streaming Client. However, the memory usage continues to be a problem. There are numerous values to control th...

Using session to reduce CPU load [PHP]

I have a page which performs following operations: Executes a query in a DB (More precisely, select u.user_uid, ut.user_metatada from users u, user_tag ut where u.uid=ut.uid. One user can have one or more metadatas) Generates an array of data based on result of the query Performs some complicated operation on these arrays (More about t...

How to get current memory usage in android?

I have used /proc/meminfo and parsed command response.however it result shows that : MemTotal: 94348 kB MemFree: 5784 kB means. it shows there is only 5MB free memory. Is it possible with android mobile? There is only 5-6 application installed on my mobile and no other task is running. but still this command shows ther...

In php, how similar to an array can I make an object act? And how would I do that?

I know that by implementing iterable you can make an object able to be foreached over. I'd like to take it further and make an object react like an array would in as many places as possible where an array is called for. (The reason for this is because I'm selecting data from a database, and the statement object that results by default ...

SQL Server 2008 on production using 10GB memory . Is this normal ?

Hi, I have a SQL Server 2008 in production environment (Windows 2003 -64 bit) and it is consuming 10 GB memory of installed 20GB. Is this normal behavior or is there anything wrong with the configuration ? P.S. I have hosted one web application which is used by hundreds of users concurrently everyday . ...

Jpanel with multiple images - Memory Usage

Hello, Some time ago I made the following question about placing multiple images in a JFrame: http://stackoverflow.com/questions/2155596/can-i-create-a-jframe-with-multiple-images. The problem is: When I'm mooving the scrollbar to see the images, I figured out that it consumes a lot of memory (about 1mb each scroll roll for the entire f...

Memory Comsuption in Java Programs running on different Computers

Hello I have a java program that realizes a lot of mathematical operations and handle with a lot of object instances. But the most interesting I noticed is that in different computers, the memory comsuption is drastically different. On a Intel Core 2 Duo (2Ghz) with 2Gb of ram and running WinXP 32bits- my program uses around 185mb of m...

programmatic memory tracking in java

I am working on a large pre-existing system and can't use any of the external profiler tools that have been mentioned in other questions. That being said, is there any programttic way for me to get java to print out what variables are still allocated and using heap space? Variable name and type would be ideal but any identifying variab...

How much is memory usage likely to grow when moving to 64bit?

When moving an application from 32bit to 64bit, where will increased memory usage occur? I understand that pointers will double in size, I suspect that the chars in a string are 'bunched' to use memory more efficiently (so will not use much more memory). Where else would memory usage increase? Is there anywhere that it would decrease, ...

Extreme memory usage for individual dynamic allocation

Hi folks, here's a simple test I did on MSVC++ 2010 under windows 7: // A struct with sizeof(s) == 4, e.g 4 bytes struct s { int x; }; // Allocate 1 million structs s* test1 = new s[1000000]; // Memory usage show that the increase in memory is roughly 4 bytes * 1000000 - As expected // NOW! If I run this: for (int i = 0; i < 10000...

Zend_Cache unserialize - memory hog?

I've setup Zend_Db_Table_Abstract so it uses metadata cache and then profiled with xhprof to see how much memory it uses. Turns out 34 calls from _setupMetadata to Zend_Cache_Core::load use up 7mb memory, most of it being used by calling unserialize. The configuration for the metadata cache is: resources.cachemanager.db_metadata.front...

Python - Using cPickle to load a previously saved pickle uses too much memory?

Python - Using cPickle to load a previously saved pickle uses too much memory? My pickle file is about 340MB but takes up 29% of 6gb of memory when loaded. This seems a bit too much. The pickle file is a dictionary of dictionaries. Is this appropriate? Code used: import cPickle as pickle file = pickle.load( file_handle ) Thanks ...

Detecting and monitoring RAM usage on a Windows system

I would like to check how much RAM a program I am working on is using, and I was wondering what methods/programs are available that can do this? Is there an easy way to "predict" this? (ie, DLLs are loaded directly into RAM, right? Thus, the file sizes of the DLLs would indicate how much RAM they take up? Am I correct?) Thanks! ...

Referactoring code in Action Script and php to optimize runtime memory usage

I used to write programs in the android sdk for google phone. One of the android developers guide that I read says that it is more efficient to declare a const public static const NO:String = "no"; var1 == NO; var2 = NO; than to do this var1=="no"; var2="no"; For Java, when you write "no" each time, a new variable is create...

Possible to cast to pointer of given type determined at runtime in C?

I'm fairly sure the answer to this is 'no, don't be stupid', but as they say, there are no stupid questions (only stupid people asking them). I want to calculate the offset of an array. I have a void * handle to it and the sizeof(element). I don't have an x* pointer (where x is the type of the element). Is there any way I can cast the...

std::vector<std::vector<type>> for sparse matrix structure or something else?

I am implementing a sparse matrix class in compressed row format. This means i have a fixed number of rows and each row consists of a number of elements (this number can be different for different rows but will not change after the matrix has been initialised. Is it suitable to implement this via vectors of vectors or will this somehow ...

out of memory error dealing with large bitmaps and the android activity life cycle

I have a scrollable map app which for now has a huge bitmap. It loads fine on startup, but when it looses foreground status and the user brings it backs again im getting an out of memory error. In onPause it trashes the bitmap using recycle, and marks it as null. The onResume checks to see if map==null and will load the bitmap back again...

Can this image processing code be optimised to use less memory?

Hello stackoverflow, I have a python function that takes a string s-expression like "(add (sub 10 5) 5)", where "add" and "sub" are actually image processing functions, and evaluates and creates the image represented in the string. The image processing functions take constants, variables, or other images (represented as lists of vectors...

My QT static builds run out of memory on other systems

When I build my application statically, it comes out to just over 5Mb, so it's a small, simple program. However, any system that has under 3Gb of ram can't run the program, saying there's not enough memory. There is nothing very memory intensive in the program, and I did nothing to allocate memory specifically. Any thoughts on whats caus...