memory

Programmer's understanding of Memory in the Vista Windows Task Manager

I know a fair bit about the Windows Task Manger in XP, but I would like to understand it better in Vista. What is the difference between "Working Set (Memory)" and "Memory (Private Working Set)". What is the Paged Pool, what is the NP Pool (Non-Paged?). How do I use these to determine what is going on with memory usage? As an aside, ...

Multiple apps sharing same reference data . .

I have multiple winforms applications that download large sets of reference data on startup. I realized that there might be a more efficient way to store this data locally instead of duplicating the memory in everyone one of the applications. This data is used for large drop down pick lists and data mappings. Does anyone have an out o...

C# accessing memory map file

Looking for code samples to access a memory map file in C# ...

Opening XPS document in .Net causes a memory leak

The following code snippet illustrates a memory leak when opening XPS files. If you run it and watch the task manager, it will grow and not release memory until the app exits. '** Console application BEGINS. Module Main Const DefaultTestFilePath As String = "D:\Test.xps" Const DefaultLoopRuns As Integer = 1000 Public Sub ...

Convert memory address range in running Linux process to symbols in object file?

Here is a snippet of the file /proc/self/smaps: 00af8000-00b14000 r-xp 00000000 fd:00 16417 /lib/ld-2.8.so Size: 112 kB Rss: 88 kB Pss: 1 kB Shared_Clean: 88 kB Shared_Dirty: 0 kB Private_Clean: 0 kB Private_Dirty: 0 kB Referenced: 88 kB Sw...

In-memory search index for application takes up too much memory - any suggestions?

In our desktop application, we have implemented a simple search engine using an inverted index. Unfortunately, some of our users' datasets can get very large, e.g. taking up ~1GB of memory before the inverted index has been created. The inverted index itself takes up a lot of memory, almost as much as the data being indexed (another 1G...

Is there a way to know, programatically, how much space an object is taking in memory? (.Net 2.0)

I would like to be able to know, in run-time in my code, how much memory a certain object is taking (a Dataset in this case, but i'm looking for a "general" solution). Is this possible through reflection? This is for .Net 2.0. Thanks! ...

Checking RAM Bays (Windows API)

I know that it is possible to check how much physical RAM is installed using GetPhysicallyInstalledSystemMemory or how much ram the operating system can see using GlobalMemoryStatusEx. However, I am wondering if there is any way to check how much ram a user has installed by slot. That is, to be able to programmatically tell the differe...

Size of a byte in memory - Java

I have heard mixed opinions over the amount of memory that a byte takes up in a java program. I am aware you can store no more than +127 in a java byte, and the documentation says that a byte is only 8 bits but here I am told that it actually takes up the same amount of memory as an int, and therefore is just a Type that helps in code c...

Where are variables in C++ stored?

Where are variables in C++ stored? Inside the RAM or the processor's cache? ...

Is there a memory efficient replacement of java.lang.String?

After reading this old article measuring the memory consumption of several object types, I was amazed to see how much memory Strings use in Java: length: 0, {class java.lang.String} size = 40 bytes length: 7, {class java.lang.String} size = 56 bytes While the article has some tips to minimize this, I did not find them entirely satisfy...

Freeing in an atexit()

Is there any point to freeing memory in an atexit() function? I have a global variable that gets malloc'ed after startup. I could write an atexit() function to free it, but isn't the system going to reclaim all that memory when the program exits anyway? Is there any benefit to being tidy and actively cleaning it up myself? ...

Strategies for handling memory consumption in PHP5 ?

We have a large management software that is producing big reports of all kinds, based on numerous loops, with database retrievals, objects creations (many), and so on. On PHP4 it could run happily with a memory limit of 64 MB - now we have moved it on a new server and with the same database - same code, the same reports won't come up wi...

During execution, how can a java program tell how much memory it is using?

During execution, how can a java program tell how much memory it is using? I don't care how efficient it is! ...

How to tell how much main memory an app uses

Hi all, I need to choose a database management system (DBMS) that uses the least amount of main memory since we are severely constrained. Since a DBMS will use more and more memory to hold the index in main memory, how exactly do I tell which DBMS has the smallest memory footprint? Right now I just have a memory monitor program open...

IIS Worker Process using a LOT of memory?

I have one website on my server, and my IIS Worker Process is using 4GB RAM consistently. What should I be checking? c:\windows\system32\inetsrv\w3wp.exe ...

When is memory allocated in the .NET compact framework?

When is memory allocated in the .NET compact framework? If there is a difference between value and reference types, please detail. Documentation or steps to confirm are appreciated. In particular, consider this scenario... private MyClass item; // here? public void MyMethod() { item = new MyClass(); // or here? } ...

Java memory consumption, "top" and HP-Ux

We ship Java applications that are run on Linux, AIX and HP-Ux (PA-RISC). We seem to struggle to get acceptable levels of performance on HP-Ux from applications that work just fine in the other two environments. This is true of both execution time and memory consumption. Although I'm yet to find a definitive article on "why", I believe ...

"Mem Usage" higher than "VM Size" in WinXP Task Manager

In my Windows XP Task Manager, some processes display a higher value in the Mem Usage column than the VMSize. My Firefox instance, for example shows 111544 K as mem usage and 100576 K as VMSize. According to the help file of Task Manager Mem Usage is the working set of the process and VMSize is the committed memory in the Virtual addre...

jboss with less memory

I have now 1gb ram at work(i hope that will change soon) and jboss takes almost half of it and that is too much, i turned off logging to file, what more can i do to reduce memory usage ? ...