memory-usage

A very basic auto-expanding list/array

Hi, I have a method which returns an array of fixed type objects (let's say MyObject). The method creates a new empty Stack<MyObject>. Then, it does some work and pushes some number of MyObjects to the end of the Stack. Finally, it returns the Stack.ToArray(). It does not change already added items or their properties, nor remove them...

Eclipse Memory usuage in Windows Vs Linux..

Can someone please give me the details about the Eclipse memory usage in Windows XP and Linux? I heard Eclipse consumes less memory in Linux compared to Windows? Is it true? What ever the OS is, IDE will look for some amount memory so how will it vary with OS? Related Question: Eclipse memory use ...

What is the exact difference between MEM_RESERVE and MEM_COMMIT states?

As I understand it MEM_RESERVE is actually 'free' memory, ie available to be used by my process, but just hasn't been allocated yet? Or it was previously allocated, but had since been freed? Specifically, see in my !address output below how I am nearly out of virtual address space (99900 KB free, 2307872 as MEM_PRIVATE. But the sta...

OutOfMemoryException, large Private Data

Hello, In previous series: http://stackoverflow.com/questions/2543648/outofmemoryexception-stack-size-is-huge-large-number-of-threads I have a .net windows service that consumes a lot of memory. The GC heap is not big. Also the stack size is not big. What is big is something called a private data. Also I can see in task manager that m...

php memory how much is too much

I'm currently re-writing my site using my own framework (it's very simple and does exactly what I need, i've no need for something like Zend or Cake PHP). I've done alot of work in making sure everything is cached properly, caching pages in files so avoid sql queries and generally limiting the number of sql queries. Overall it looks lik...

what exactly does system.totalMemory test in Actionscript 3.0?

before somebody screaming RTFM, let me clarify. does system.totalMemory test the memory used in movie which invokes it, or used by all movies running on the browser/system? I want to initiate garbage collaction for my app when it reaches a certain limit and i dont want the process to be initialized by the user watching funny cats youtu...

iPhone image app not releasing memory as in instruments using imageNamed

hi, im building iPhone app that downloads images (UIImageView) from internet and adding them to UIScrollView. This scroll view could contain 20 or more UIImageViews. Iam adding UIImages to UIImageView like this: UIImageView *newView = [[UIImageView alloc] initWithImage: image]; Then I just scroll these images like in photo app. Proble...

Calculate private working set (memory) using C#.

Hello, How do I calculate the private working set of memory using C#? I'm interested in produces roughly the same figure as taskmgr.exe. I'm using the Process namespace and using methods/data like WorkingSet64 and PrivateMemorySize64, but these figures are off by 100MB or more at times. Thanks, ...

in java, which is better - three arrays of booleans or 1 array of bytes?

I know the question sounds silly, but consider this: I have an array of ints (1..N) and a labelling algorithm. at any point the item the int represents is in one of three states. The current version holds these states in a byte array, where 0, 1 and 2 represent the three states. alternatively, I could have three arrays of boolean - one f...

Super wide, but not so tall, bitmap?

Is there any way to create a more space/resource efficient bitmap? Currently I try to render a file, approx 800px high but around 720000px wide. It crashes my application, presumably because of the share memory-size of the bitmap. Can I do it more efficient, like creating it as an gif directly and not later when I save it? I try to save...

How to measure peak memory size etc. during a given interval in Windows

With PROCESS_MEMORY_COUNTERS_EX, I can find the peak pagefile (VM) size since the beginning of a process. Can I somehow get the peak pagefile size starting from some other point in time? ...

How to manipulate *huge* amounts of data

Hi there! I'm having the following problem. I need to store huge amounts of information (~32 GB) and be able to manipulate it as fast as possible. I'm wondering what's the best way to do it (combinations of programming language + OS + whatever you think its important). The structure of the information I'm using is a 4D array (NxNxNxN) ...

Memory limited image processing in server

We have a server (Java EE) application, it will do some image processing jobs based on user request. Such as convert image format (e.g. TIFF to JPEG), convert image color (e.g. RGB to Gray to BW), resample (resize) image. Some customer from printing industry use very large image, such as 2000 dpi, 6 * 8 inch, 4 color components, which wi...

Dowser: "bad argument to internal function"

Hi all! I'm trying out Dowser, it's really cool but I'm stuck with a little problem, and I couldn't find anything helpful on Google, so here I am.. ^^; I'm running a CherryPy+SQLAlchemy application.. It works normally, except that when I enable Dowser (that is, after I call dowser.Root()), now and then I get exceptions like: System...

Prototypal inheritance should save memory, right?

Hi Folks, I've been wondering: Using prototypes in JavaScript should be more memory efficient than attaching every member of an object directly to it for the following reasons: The prototype is just one single object. The instances hold only references to their prototype. Versus: Every instance holds a copy of all the members and...

How to find number of memory accesses

Can anybody tell me a unix command that can be used to find the number of memory accesses that took place in a given interval. vmstat, top and sar only give the amount of physical memory space occupied/available .. But do not give the number of memory of accesses in a given interval ...

Lua metatable Objects cannot be purge from memory?

Hi there, I'm using a proprietary platform that reported memory usage in realtime on screen. I decided to use a Class.lua I found on http://lua-users.org/wiki/SimpleLuaClasses However, I noticed memory issues when purging object created by this using a simple Account class. Specifically, I would start with say 146k of memory used, crea...

Python - do big doc strings waste memory?

I understand that in Python a string is simply an expression and a string by itself would be garbage collected immediately upon return of control to a code's caller, but... Large class/method doc strings in your code: do they waste memory by building the string objects up? Module level doc strings: are they stored infinitely by the int...

android java memory management

how are static method calls handled by the JVM? does it still allocate memory when a call is made? if yes, how does garbage collection treat this allocation after the method call? ...

Which of FILE* or ifstream has better memory usage?

I need to read fixed number of bytes from files, whose sizes are around 50MB. To be more precise, read a frame from YUV 4:2:0 CIF/QCIF files (~25KB to ~100KB per frame). Not very huge number but I don't want whole file to be in the memory. I'm using C++, in such a case, which of FILE* or ifstream has better (less/minimal) memory usage? P...