memory

Are there O(1) random access data structures that don't rely on contiguous storage?

The classic O(1) random access data structure is the array. But an array relies on the programming language being used supporting guaranteed continuous memory allocation (since the array relies on being able to take a simple offset of the base to find any element). This means that the language must have semantics regarding whether or n...

sun.java2d.loops.ProcessPath$Point

I am profiling an application suddenly using a lot of memory, and i am getting this: sun.java2d.loops.ProcessPath$Point As being allocated almost 11.000.000 times. What is it, and is there a solution to this? ...

iPhone Development - Memory limitation for iphone application

Can anyone point into the right direction here. I want to respond when my application receives memory warning, (i want to know how to respond to this notification). Plus, How much memory can i wire with my application? Any articles or book reference would be great. Thanks. ...

Programatically get heap info using jmx with java 5

I am aware of using jconsole to attach to a java process to get memory information. Specifically I'm after getting information on the various memory pools programatically so I can tie it to a monitoring application. Thanks! ...

How do I create a (32-bit) .NET application to use 3 GB RAM?

I am creating a .NET application (C#) that needs to use a lot of RAM. I recently knew that on 32-bit versions of Windows XP I can only use 2 GB, unless I use the /3Gb switch, and set the IMAGE_FILE_LARGE_ADDRESS_AWARE flag in the executable header. But since I'm developing a .NET application, I guess I cannot modify the executable direct...

Monitor memory usage inside your own process

Let's put Heisenberg aside for a brief moment. How would I go about to, from within my own process, monitor how much memory this process is using? (I might have under-specified the question on purpose, dreaming of creative answers...) ...

iPhone Development - Lessons in memory management

I need lessons in memory management. I have an application that uses multiple views (around 10), some of these are attached to tab controller. Problem is that I'm using images (many images that I load from a web service). I'm facing the following issues. The memory keeps increasing when I scroll in the table view (why?) - I checked the...

Program to view Shared Memory in Windows?

I'm looking for a program to view and browse the (local) shared memory in Windows x32/x64. I know this exists because I've seen it in action before. For some reason Google and MSDN fail me on this one. ...

How do I track down a mod_perl memory leak?

I'm using mod perl 1.3.0 with apache 1.3.41 perl version 5.8.6, and the memory size seems to grow about 4k every 3rd or 4th request. The Perl script we are running is simply: print "Content-type: text/html\n\n"; print "baby"; Yet that apache process just grows and grows when we slam it with apache benchmark. We are hitting it with:...

What generally causes PHP to encounter a stack overflow?

I am on a windows IIS server serving some php sites. We have moved a working PHP site on to our server, however submitting one of the forms returns: PHP has encountered a Stack overflow When commenting out the MYSQL INSERT and assigning SESSION variables the form processes, however these are vital segments of the submission form. Any...

Memory Limits

I have an app which I have created to copy users (10,000+) from one domain and create the user in another domain with custom properties. The app seems to run fine until it hits a 1.7gb of memory, I know there is a limit of 2gb per process on 32bit machines but I am running this on a copy of Windows Server 2008 x64 with 24gb of RAM. My ...

PHP Object Creation and Memory Usage

A basic dummy class: class foo { var $bar = 0; function foo() {} function boo() {} } echo memory_get_usage(); echo "\n"; $foo = new foo(); echo memory_get_usage(); echo "\n"; unset($foo); echo memory_get_usage(); echo "\n"; $foo = null; echo memory_get_usage(); echo "\n"; Outputs: $ php test.php 353672 353792 353792 3537...

Wrapping unmanaged c++ in a managed wrapper

I have an unmanaged C++ library. I would like to expose the functionality for .NET applications. There's one partucular function I am not sure how to handle: typedef void (free_fn*) (void*); void put (void *data, free_fn deallocation_function); The idea is that you pass dynamically allocated buffer to the function and supply a dealloca...

Turning off the D garbage collector

I'm a C++ programmer thats considering using D for a personal project I want to play around with. I was wondering if there's a way to completely disable the garbage collector, and what the risks are of doing so. I know I can manage my own memory by overriding new and delete to use malloc and free, but if I did that I'd rather the gar...

Cache, loops and performance

Some time ago I wrote a little piece of code to ask about on interviews and see how people understand concepts of cache and memory: #include "stdafx.h" #include <stdlib.h> #include <windows.h> #include <iostream> #define TOTAL 0x20000000 using namespace std; __int64 count(int INNER, int OUTER) { int a = 0; int* arr = (int*) H...

Recurring "PermGen" in Tomcat 6

I keep getting a "PermGen" error on my Tomcat 6 server. I know what application is causing the problem, but I am not sure why it is doing so. The application is using MySQL 5 and running on JDK 6. Are there any tools/suggestions to diagnosis or analyze the underlying issue(s) with the specific application? Thanks ...

Visual Studio 2005 Search Memory

I don't think this exists, but I'll throw this out there anyway. Is it possible, while debugging, to search for a value in memory? For example, if I have a string "uniqueString" cached somewhere in memory, but I don't know under which variable it's stored--can I do a search for it? As in, find out which variable(s) have "uniqueString"...

Where is an array initialized by an initializer list stored?

Given this piece of code: (void)someFunction(void) { int array[] = {1,2,3,4,5,6,7,8,9,10}; } Where are the values of the array stored? Stack? Heap? Together with those string literals. (Is it called High Frequency Heap?) Somewhere else? I'm asking because I'm unsure regarding this question: Create an array of integers propert...

Android: Strange out of memory issue

I am not sure where to start to explain this one. I have a list view with a couple image buttons on each row. When you click the list row, it launches a new activity. If you review some of my other posts, I have had to build my own tabs because of an issue w/ the camera layout. The activity that gets launched for result is a map. If I c...

Is variable permanence available in Ruby?

In Matlab, I recall being able to declare an array and initialize it and it resides in memory during the entire Matlab session. I could copy it, modify it, and run it through tests. Is this option available in Ruby? Basically I want to create and populate an array of 12 million 32-bit integers. Then I want to run code that accesses t...