memory

how to show running mysql queries in php

i have a overflow memory usage problem and i need badly to scan all my scripts . so my question is how to show a list of running mysql queries in php ...

UNIX Domain sockets vs Shared Memory (Mapped File)

Hi. Can anyone tell, how slow are the UNIX domain sockets, compared to Shared Memory (or the alternative memory-mapped file)? Thanks. ...

libc.so has four segments mapped in a process, why?

To see what memory map regions a running program contains, I write a simple C program to read data from /proc/self/maps: #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <unistd.h> #include <fcntl.h> int main() { char buf[1024]; int fd; ssize_t n; fd = open("/proc/self/maps", O_RDONLY); if (fd ...

Why does a native library use 1.5 times more memory when used by java as when used by a C-Programm under linux?

I've written a library in C which consumes a lot of memory (millions of small blocks). I've written a c program which uses this library. And I've written a java program which uses the same library. The Java program is a very thin layer around the library. Basically there is only one native method which is called, does all the work and re...

Memory leak using SQL FileStream

Hi, I have an application that uses a SQL FILESTREAM to store images. I insert a LOT of images (several millions images per days). After a while, the machine stops responding and seem to be out of memory... Looking at the memory usage of the PC, we don't see any process taking a lot of memory (neither SQL or our application). We tri...

iPhone memory management problems

I detach a thread to my method wich has a while-loop and even if I have an autoreleasePool, I release the objects manually since the while-loop can continue for a while... The problem is that after a while, the app crashes due to memory problems and if I look in Instruments I can see a huge pile of NSString allocated and a stairway to he...

Silverlight file upload memory issue

Using Silverlight 3 to build a file upload app. It can upload files of just about any size - it works (depending on circumstance) with 4GB files. It uploads chunks of the files, so that if anything happens, the upload can be resumed from the most recent chunk. The circumstance where uploading does not work is in IE and Chrome when uploa...

What's the fastest way to load big image on iPhone ?

Should I use UIImage or CGImage ? Png or Jpg ? I've read the doc and tried different things but did not notice significant improvement. Loading an image can take 1 good second which seems slow ...

Working set of memory

Hi, Why does the memory decrease when you minimize an Application ? I found this out while running a Flash Application in IE. It was taking around 200 MB memory but when I minimized the IE it came down to 5 MB's. I saw similar behaviour with Outlook and other EXE's. I googled and found out that the working set of a process decreases w...

uiimage allocation problem

I have 3 UIImages in UIScrollView and I am initializing these images in the following way: UIImage *dimage = [[UIImage alloc] initWithData:data]; Where data is a NSdata gotten from url request. After this I am caching the images. When I check memory allocation the 3 images takes up 472 Kb each and allocation has been requested by "img...

Where is my MMF(Memory-Mapped-File) memory in Windows Task Manager?

Two applications share memory by MMF. A create MMF (about 1GB), B open that MMF file by name. When I see Windows Task Manager, A has 1GB memory. But, after several closing and launching B app again, (or after 1 days later? I'm not sure how to reproduce) A's memory in Windows Task Manager is below 1K bytes. My guess is, maybe because A a...

PHP Memory Optimization

I am using xdebug to trace some code to see how much memory it is using, but at the start of the trace, it is using around 560224 bytes of memory. Is this normal? This is before any code is executed. Edit: I should have clarified; this is not what I am trying to optimize. I just noticed it and wanted an explanation. ...

Prevent memory working set minimize in Console application?

Hi, I want to prevent memory working set minimize in Console application. In windows application, I can do by overriding SC_MINIMIZE messages. But, how can I intercept SC_MINIMIZE in console application? Or, can I prevent memory working set minimize by other ways? I use Visual Studio 2005 C++. Somebody has some problem, and the solution...

ASP.NET Session State Service in Sql Server but w3wp.exe #private increasing

I have recently moved our ASP.NET session state from InProc to a Sql Server solution. I can see session data being inserted into the Sql Server database. I'm monitoring the w3wp.exe process using the "Private bytes" & "# Bytes in all heaps" performance counters. As I navigate through the website it places data into session, however the ...

Python deep getsizeof list with contents ?

I was surprised that sys.getsizeof( 10000*[x] ) is 40036 regardless of x: 0, "a", 1000*"a", {}. Is there a deep_getsizeof which properly considers elements that share memory ? (The question came from looking at in-memory database tables like range(1000000) -> province names: list or dict ?) (Python is 2.6.4 on a mac ppc.) Added: 10000*...

How to record every allocations and deallocations of memory on a program?

I want to see is fragmentation the reason of increasing memory usage of my twisted server. I have posted a question here: How to find the source of increasing memory usage of a twisted server? Now, what I am going to do is to visualize the heap. I found an article: Memory fragmentation. The figure of heap in that article is something ju...

iPhone: leaks from other Apps taking up RAM??

I'm reading some people stating that if another (3rd party) app on someone's iPhone has been leaking memory, that this may reduce the (mystery) amount of RAM your app would otherwise have available. This confuses me -- does not all app memory get released when the app is closed by the user? And only one app is open at a time on iPhone? ...

when does Python allocate new memory for identical strings ?

Two Python strings with the same characters, a == b, may share memory, id(a) == id(b), or may be in memory twice, id(a) != id(b). Try ab = "ab" print id( ab ), id( "a"+"b" ) Here Python recognizes that the newly created "a"+"b" is the same as the "ab" already in memory -- not bad. Now consider an N-long list of state names [ "Ari...

What is the best way to prevent out of memory (OOM) freezes on Linux?

Is there a way to make the OOM killer work and prevent Linux from freezing? I've been running Java and C# applications, where any memory allocated is usually used, and (if I'm understanding them right) overcommits are causing the machine to freeze. Right now, as a temporary solution, I added, vm.overcommit_memory = 2 vm.overcommit_ratio...

How to use GetNumaProximityNode (Win7+)?

Starting with Win7/Server2008R2 the GetNumaProximityNode(Ex) function is available. It should help retrieve the distance between NUMA nodes, but I can't understand from the documentation (http://msdn.microsoft.com/en-us/library/ms683206(VS.85).aspx) how it's supposed to work. It says that you give it a distance, and it returns the corres...