memory

Tomcat memory and virtual hosts

Hello; I have a VPS on which I serve Tomcat 6.0. 500mb memory was enough, when I had only two applications. Last week I deployed another web application and formed a new virtual host editing Tomcat server.xml. But the server responses slow down, linux started to eat the swap. When I increased the memory 750 mb it become stable again. Bu...

[Iphone] Is "create then release then re-create then release" better than "create then use twice then release" ?

Hey guys, Let's put you this in context ;) Suppose you have a tableview that you can refresh. Would you keep the activityAnimator in memory or re-create it every time you click on refresh ... ? I know this could sound pretty obvious, it seems pretty clear that in the first case you get to speed up your app and in the other case you ge...

How to find out the memory footprint of my Android App?

Well, the title says it. It would also be handy to know how many memory is still available. I am writing a memory hungry application that tends to crash randomly (in native Code), and my suspicion is that it gets out-of-memory. ...

Problems with PHP when trying to create big array

Hi, Here is my code, which creates 2d array filled with zeros, array dimensions are (795,6942): function zeros($rowCount, $colCount){ $matrix = array(); for ($rowIndx=0; $rowIndx<$rowCount; $rowIndx++){ $matrix[] = array(); for($colIndx=0; $colIndx<$colCount; $colIndx++){ $matrix[$rowIndx][$colIndx]=...

twisted connectTCP memory leak?

I found my program have a memory leak when I used connectTCP. <class 'twisted.internet.tcp.Client'> <<class 'twisted.internet.tcp.Client'> to ('10.25.76.117', 8086) at 2066c5b0> <type 'dict'> {'_tempDataBuffer': [], 'protocol': None, '_tempDataLen': 0, 'realAddress': ('10 <type 'tuple'> ('10.25.76.117', 8086) <type 'list'> ...

Creating physical memory from user space to use for DMA transfers

I want to create some memory to use for DMA transfers. (Using Linux 2.6.18-128.el5 #1 SMP) I have a API stack+kernel driver for my H/W that can do this for me, but its very very slow! If I use the API to create a DMA transfer, it allocates some memory very high up in System RAM (eg 0x7373a6f8 on one run). (I have the ICD of the device,...

How to debug a strange memory leak ( C++ )

I'm writing a linux deamon and as for now it works pretty well, but it leaks memory ( and it's bad - after few hours it segfaults after using 60% of the system's memory). The strange thing is, that I'm using only new/delete operators and have a try/catch block around the main function, so it's not an exception thrown by new - it just seg...

Why do I appear to have a memory leak when user "Server" garbage collection?

Here's my situation. I want an explanation of why this is happening. I am reading about GC here but I still don't get it. Workstation case: When I run with workstation garbage collection, my app ramps up to use about 180MB of private bytes and about 70MB in ".NET CLR Memory #bytes in all heaps". Memory continues to be stable for seve...

string overflow detection in C

We are using DevPartners boundchecker for detecting memory leak issues. It is doing a wonderful job, though it does not find string overflows like the following char szTest [1] = ""; for (i = 0; i < 100; i ++) { strcat (szTest, "hi"); } Question-1: Is their any way, I can make BoundsChecker to detect this? Question-2: Is their ...

dompdf memory issues

I'm using DOMPDF to generate about 500 reports from one script. It's running out of memory after about 10-15 PDFs have been generated. In debugging, it looks like it's loading 8M every time it gets to the font loading stuff, but this seems like something that should be handled with the font caching code. Any ideas of what's going wrong...

How to ignore false positive memory leaks from _CrtDumpMemoryLeaks?

It seems whenever there are static objects, _CrtDumpMemoryLeaks returns a false positive claiming it is leaking memory. I know this is because they do not get destroyed until after the main() (or WinMain) function. But is there any way of avoiding this? I use VS2008. ...

Find current heap size with jmap

Hello I would like to find out what is the total heap size that is in use at a certain time by a Java process and I have to use jmap. The output of jmap -heap <pid> gives me something like this: Attaching to process ID 2899, please wait... Debugger attached successfully. Server compiler detected. JVM v...

iPhone Memory Alert

I have read about this function didReceiveMemoryWarning that actually hasn't really helped. I would like to show a UIAlert View to tell the user that the action he is about to take will lead to problems with memory. So apart from crashing, which is a nasty way to inform the user that there is a memory Warning received, is there a possi...

What does .NET Memory "Gen X Heap Size" .NET performance counters measure exacly?

Is that "the sum of all objects allocated" or is it "amount of memory allocated from the operating system for storing objects". Or is it something else? I think it is memory allocated from the OS, but would like a confirmation. ...

iPhone app quits randomly when accessing a NSString

I've got a problem with a NSString in my app. I've defined it in the header file of my view controller. NSString *locationCoordinates; and I set its value in a -(void) method. - (void)locationUpdate:(CLLocation *)location { <...> NSArray *locArray = [locString componentsSeparatedByString:@", "]; NSString *xCoordinat...

C++ string literal data type storage

void f() { char *c = "Hello World!" } Where is the string stored? What's the property of it? I just know it is a constant, what else? Can I return it from inside of the function body? ...

When will simple parallization not offer a speedup?

I have a simple program that breaks a dataset (a CSV file) into 4 chunks, reads each chunk in, does some calculations, and then appends the output together. Think of it as a simple map-reduce operation. Processing a single chunk uses about 1GB of memory. I'm running the program on a quad core PC, with 4GB of ram, running Windows XP. ...

.NET Application pool often overflowing

.NET application pool often overflowing. What Should I do for solving this problem? I am using singletton class for db connection. Also; My all db connection lines in using code block. So, it be dispose by .NET engine. What Should I do for solving this problem? ...

What's the difference between intializating a struct as pointer or not?

Hi, I have the following for my HashTable structure: typedef char *HashKey; typedef int HashValue; typedef struct sHashElement { HashKey key; HashValue value; } HashElement; typedef struct sHashTable { HashElement *items; float loadFactor; } HashTable; I never really thought about it until now but I just realized th...

How much memory alloc an UIImageView 320x480?

How much memory alloc an UIImageView 320x480? ...