memory

iPhone - dealloc - Release vs. nil

Wondering if someone with experience could possibly explain this a bit more. I have seen examples of... [view release]; view = nil; ....inside the (void) dealloc. What is the difference and is one better then the other? What is the best way? When doing retainCount testing I have personally seen nil drop a count from 3 to 0 for me...

iPhone - Instruments ObjectAlloc GeneralBlock

Okay, I have been trying to days to lower the Net Bytes on GeneralBlock 16, I understand that a GeneralBlock is created by the iPhone's OS when creating its own object. Is it possible to lower this alloced memory? I have read in some places that GeneralBlock is something that you shouldn't worry about. True? ...

cooperative memory usage across threads?

I have an application that has multiple threads processing work from a todo queue. I have no influence over what gets into the queue and in what order (it is fed externally by the user). A single work item from the queue may take anywhere between a couple of seconds to several hours of runtime and should not be interrupted while processi...

On linux, how should I calculate the amount of free memory from the information in /proc/mem?

There are many fields in /proc/mem: I know that I can't just take "MemFree", because lots of memory is actually cached. So the question is, how can I calculate the amount of free memory? Assumptions: The system is configured with no swap space. My definition of "free memory" is that malloc starts failing when this hits zero. ...

Out of memory error at compile time Java 6.0

I know how to use -Xmx -Xms at runtime, is there a way to ask the compiler to allocate more ram. I have 2 gigs on my pc. I don't use an IDE just textpad. I am trying to create a BigInteger with 10,000,000 digits and do operations on it. I tried creating a StringBuffer and ensureCapacity(10000000) and it wont compile. Is there a clas...

Java Runtime.maxMemory incorrect?

I ran the following method Runtime.getRuntime().maxMemory() and gave 85196800. However, I then ran top from the command line and it showed PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 8672 root 20 0 ...

executable failing in malloc_y function

we are trying to port our application from HP machine to AIX machine. it was running fine on HP machine but now its failing in malloc_y funtion. but we cant find any clue for this. who is calling this malloc_y function?? please advice. ...

How to clear E flag of MTRRs

Hi, I'm trying to clear E flag of IA32_MTRR_DEF_TYPE MSR register. Does anyone knows how? Thanx Moho ...

What does the class class [B represents in Java?

I am trying out a tool jhat here to test my java memory usage. It reads in a heap dump file and prints out information as html. However, the tables shows as follows: Class Instance Count Total Size class [B 36585 49323821 class [Lcom.sun.mail.imap.IMAPMessage; 790 16254336 class [C 124512 12832896 class [I 23080 11923504 ...

How to force Javamail to clear its message cache?

I'm running a server that uses Javamail. It has a count listener with IMAP's IDLE, such that when a new mail comes in, certain piece of code is executed. The list of new message is given to my listener as a parameter. I read the information off it and be done with it. All is good except my server leaks a lot of memory!! I did a heap dump...

Python CreateFile Cannot Find PhysicalMemory

I am trying to access the Physical Memory of a Windows 2000 system (trying to do this without a memory dumping tool). My understanding is that I need to do this using the CreateFile function to create a handle. I have used an older version of win32dd to help me through this. Other documentation on the web points me to using either "\D...

Is there a remote profiler for Java? (that uses JMX preferably)

I am trying to pin down a memory leak problem for my standalone Java program that runs on unix. I have the port and params setup such that I can connect to it using JMX with JConsole or VisualVM already. Those help a little but unfortunately it doesn't tell you where the memory has gone, it only tells you how much memory is used. I'm l...

__attribute__ ((__aligned__)) not working with static variables

This has been driving me nuts for days. I can't get an array to align to 16 if I declare it as static. Any help greatly appreciated. Revised Version: #include <stdio.h> #include <assert.h> #define MAX_INPUTS 250 int main() { float input[MAX_INPUTS] __attribute__ ((__aligned__(16))); printf("Address of input: %p\n", input); printf("...

Does malloc/new return memory blocks from Cache or RAM?

Hi, I wanted to know whether malloc/new returns memory blocks from Cache or RAM. Thanks in advance. ...

Installing SQL Server Express 2008 and IIS on same machine

There are a couple of questions on SO regarding the pros and (mostly) cons of having SQL Server and IIS running on the same machine: http://stackoverflow.com/questions/274846/should-sql-server-be-on-the-same-machine-as-your-iis-installation http://stackoverflow.com/questions/1401834/when-can-i-host-iis-and-sql-server-on-the-same-machin...

General strategy to resolve Java memory leak?

I have a standalone program that I run locally, it is meant to be a server type program running 24/7. Recently I found that it has a memory leak, right now our only solution is to restart it every 4 hours. What is the best way to go about finding this memory leak? Which tool and method should we use? ...

Memory Leaks in Cocoa

I'm working on an iphone application and having some trouble with memory leaks. I've read some docs about garbage collection that it make it sound simple but I must be missing something. I've got a viewController that needs access to an array which may need to repopulated from time to time. Here is a simplified version of what I have:...

Which is smaller footprint in C#

A lable sized like a rectangle with no text but has a border and is invisible (for a visual rectangle on the form around controls but not to contain the controls) or a panel? ...

Java memory mystery (do I have a leak)?

I have a standalone Java problem running in a linux server. I started the jvm with -Xmx256m. I attached a JMX monitor and can see that the heap never really passes 256Mb. However, on my linux system when I run the top command I can see that: 1) First of all, the RES memory usage of this process is around 350Mb. Why? I suppose this is be...

How to compare application memory usage on Linux and Windows?

I'm trying to compare memory utilization of an application running under Linux and Windows on the same PC. Is there a "quick and dirty" way to normalize readings from Windows task manager and Linux top utility? ...