Background:
Inspired from Apple's sample code ScrollViewSuite, I've created a view controller class that shows picture thumbnails and one selected picture. The hierarchy of controls for the "selected" picture is something like this:
--> UIView
--> UIScrollView
--> UIImageView
Following code is used to put the UIScrollView...
How to get the min and max heap size settings of a VM from within a Java program?
...
I am trying to work out some memory leak issues in an application, and I am really hoping someone here can offer me some insights that will help. I've been tinkering with this all day and I am afraid I'm completely stuck.
The application I am troubleshooting works fine initially, but will become sluggish and perhaps even crash if it is ...
Hi,
What is the advantage of zeroing out memory (i.e. calloc over malloc)? Won't you change the value to something else anyways?
-Chris
...
How do the memory utilization and performance for XML or SQLite compare on the iPhone?
The initial data set for our application is 500 records with no more than 750 characters each.
How well would XML compare with SQLite for accessing say record 397 without going through the first 396? I know SQLite3 would have a better methods for tha...
I currently have a graph that has about 10 million nodes and 35 million edges. For now the complete graph is loaded into memory at program start. This takes a couple of minutes (it is Java after all) and needs about half a gigabyte of RAM. For now it runs on a machine with a dual core processor and 4 gigabytes of RAM.
When the graph is ...
Hello
I can't truly understand why the free process returns in an error. I got this code in C:
int LuffarschackStart(void)
{
/* to avoid the program from closing */
char readEnd;
int i = 0;
board_type *board = malloc(sizeof(square_type));
if (board == NULL)
{
printf("Could not allocate the memory needed...");
scanf("%c", &...
I want my app to throw an MemoryError when its usage goes over 1GB. I'm running in WSGI daemon mode.
I see 3 places the memory limit could be:
apache.conf
wsgi somewhere
django configuration
but I can't find the right config options. In PHP you can do this with :
php_value memory_limit 1GB
in your apache.conf
...
Hi,
I have a question regarding free() in C.
Suppose I have a pointer to some struct (say node *ptr).. after freeing it can i Initialize it to NULL and make it point to some new location using malloc() or realloc()?
For Example:
node *ptr=NULL;
ptr=realloc(ptr,sizeof(node)); //works exactly like malloc
/* Do some operations on ptr */...
I am running Windows XP on an Intel x86 machine and I got an error in the instruction at memory location 0x00000001.
I am not worried about debugging the error, but I was interested to know what instructions would generally be located at the very begging of memory.
The only processors I have written low-level code for are PIC microc...
I'm trying to debug a program I've written. According to the debugger a particular void * holds the value 0x804b008. I'd like to be able to dereference this value (cast it to an int * and get it's value).
I'm getting a Segmentation Error with this code. (The program with the void * is still running in the background btw - it's 'paused')...
Hi all,
Im working in a memory restricted environment and need to create strings dynamically, but still have them not take up heap memory. So does this make sense:
static char staticStringBuffer[10240];
static size_t staticStringWatermark = 0;
void createString( const char * something, const char * somethingElse ) {
char buf[1024]...
Hey,
Can anyone point me to a source or outline how the algorithm for the low-fragmentation heap works?
Thanks in advance
...
A customer has some memory usage requirements of our application. They note that while our committed memory is reasonable, the reserved memory is high. They suspect this is because the CRT heap grows as we allocate memory, but the CRT isn't returning pages to the OS when the memory is deallocated. We are just using built-in operator ne...
I'm getting this error when I try to call the mail() function.
I tried adding ini_set('memory_limit', '64m') to my index.php file - Which include()'s all other files into that - But it didn't fix it.
I then tried adding a php.ini file into the root directory (where index.php resides) with the contents memory_limit = 64M which then gave...
Hi All,
I have a memory leak when just using subclass of UIView. It leaks 128 bytes and goes all the way to down thru CoreGraphics etc. My subclass is just a generated skeleton without anything in it. When I use just UIView instead of ScrollView no leak are reported. What could it be and what I am missing?
Thanks a lot,
ALex.
========...
Hi
I have a small doubt regarding profiling applications which never exit until we manually reboot the machine.
I used tools like valgrind which talks about memory leaks or bloating of any application which exits after sometime.
But is there any tool which can be used to tell about memory consumption, bloating, overhead created by t...
Hi.
I'm encountering what seems to be a memory corruption issue with PHP. I have a large code base that I am porting to the 5.3 runtime. I get segfaults and "zend_mm_heap corrupted" errors, but the backtraces from those points are not useful. The backtraces always lead back to various core PHP functions such as variable assignment or co...
I'm trying to reproduce a bug that seems to appear when a user is using up a bunch of RAM. What's the best way to either limit the available RAM the computer can use, or fill most of it up? I'd prefer to do this without physically removing memory and without running a bunch of arbitrary, memory-intensive programs (ie, Photoshop, Quake,...
Hi,
I am new to ObjectiveC language.
I am having trouble understanding memory management syntax.
My code is below:
NSDate* someDate;
someDate=[[NSDate alloc] init];
loop
{
someDate=[[NSDate alloc] init];
}
will I have a memory leak here ? or the NSDate object returned is [autorelease]?
Thanks
...