memory

WPF UserControl Memory leak

Hi I have a UserControl in an application where I am constantly swapping the Content property with other UIElements. However I noticed in Task Manage after a while the memory goes up after a number of swaps... Using AntProfiler I noticed for some reason there ToolBarAutomationPeer that the UserControl references.... To fix this Memo...

Query peak memory usage of a running process.

I need to query the peak memory usage by a running process from a C++ code. I looked at GetProcessmemoryInfo() function but it does not seem to give the information about peak memory usage by a process. Is there any function that does that and is it exported by kernel32.dll. ...

Should I manage pages or just lean on virtual memory?

I'm writing a database-style thing in C (i.e. it will store and operate on about 500,000 records). I'm going to be running it in a memory-constrained environment (VPS) so I don't want memory usage to balloon. I'm not going to be handling huge amounts of data - perhaps up to 200MB in total, but I want the memory footprint to remain in the...

Open Media Player with Playlist from Memory

Hi, is it possible to open the windows media player from a c# application with a self generated playlist from memory. So that I don't have to save the playlist on my storage first and the open the player with the playlist file. I don't really what to save a playlist for each temp. user selection. OR Is it possible to open the windows ...

[VB.Net] How do I dispose a TextBuilder ?

Hello there! Out of pure curiosity, is there a way to free the memory used by a StringBuilder, other than the obvious MyBuilder = New StringBuilder and MyBuilder.Remove(0, Length) (although I guess the later wouldn't free anything, would it?) Thanks! CFP. ...

Does webpage content go to DRAM or Video RAM, and what if Video RAM runs out?

If the project has a page that uses jCarousel, and it has a <ul> (or <div>) that is 15860 x 375px, with 32-bit / pixel, that's close to 24MB. Or, what if it is 1000 x 700 pixel per screenful, 6 screenful per webpage, and 5 tabs of such pages, with 32 bit per pixel 1000 x 700 x 6 x 5 x 4 = 84MB does these 24MB or 84MB go to Video RAM o...

Runtime process memory patching for restoring state

I'm looking for a method for storing the process memory, and restore it later at certain conditions. ... Actually I've read questions about it... It seems a big challenge! So, let's analyse: The application is a distributed one, but many processes are stateless (request their state to a centralized server). Processes uses network conn...

Memory mapped files in ASP.NET

I am not sure if this is possible... Right now I create various .RDP files that my users download directly off the server, with code such as this: System.IO.FileInfo fileInfo = new System.IO.FileInfo(filePath); Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=" + fileInfo.Name); ...

Eclipse Ganymede javascript editor uses huge memory

Hi, I am new to here, but I wish someone can help me resolve the problem: version: 3.5 OS: Win 7 64bit JVM 1.6 I am using the javascript editor to write some code using YUI package, and seems it uses extremely huge amount of memory. Even when I put the mouse cursor on a variable, it will put up about 100M, so it runs to 1G very soon.....

Xcode Memory problem, unloading and loading views from delegate

Hey guys just a quick question: Overview: I have a basic magazine app, it has multiple view controllers, who have 2 views each. one landscape and one portrait view for visual reasons. The app delegate has all the actions in it. These are called from the view controllers using : The_Ride_Vol_1AppDelegate *mainDelegate = (The_Ride_Vol_...

iPhone, passing object to method(s), memory management

Hey guys, I know there are a lot of questions on this topic already, but it is just not clear to me yet. So, what I am still wondering about is, if I call a method and pass it an object, do I then have to retain this object inside my method to use it there. And if I retain it, where do I release it. Lets make a bit of a more complex exam...

iPhone Memory allocation problems

Within my application I have 20 or so ViewControllers and Xibs that the user should be able to access. The problem is after looking at 5 or so of them the application crashes due to lack of memory. I have released all memory that I have allocated within the ViewControllers so I can only assume it's because its holding the memory of so ma...

IIS 7 Application Pool Private Memory Usage

For IIS 7, Help for Recycling Conditions for Application Pool says that Private Memory Usage is ...privately allocated system physical memory ... (The property is named Maximum Used Memory in IIS 6.) And, Event Log entry when application pool recycles; "A worker process with process id of '4824' serving application pool '(thepool)' has ...

What happens to identity-hashcode when there are more objects than `int` can hold?

The method System.identityHashCode(...) is called that way, because it identifies objects, so two distinct objects can't have same identity-hashcode, right? It returns an int. But what happens, on a system with huge amount of RAM, when the number of objects exceeds the integer range 2^32? Wouldn't it be a problem for HashMaps and HashS...

safe to edit CRConfig.xml in Crystal Reports Developer full edition on production machine?

Here's a question from a Crystal n00b. Accessing a database using JDBC and using the Crystal 2008 SP1 user interface (File/Export etc) I was having problems running out of Java heap. I finally started digging around in the software install folders and stumbled across CRConfig.xml. It has lots of parameters like JVMMaxHeap, documented ...

C# array question (split)

Question very simple - say, i got function, which receives array as its arguments void calc(double[] data) how do "split" this data in two subarrays and pass to sub functions like this calc_sub(data(0, length/2)); cals_sub(data(length /2, length /2)); i hope, you got the idea - in c++ i would write this void calc(double * data, in...

How to avoid OrderBy - memory usage problems

Let's assume we have a large list of points List<Point> pointList (already stored in memory) where each Point contains X, Y, and Z coordinate. Now, I would like to select for example N% of points with biggest Z-values of all points stored in pointList. Right now I'm doing it like that: N = 0.05; // selecting only 5% of points double cu...

How come netbeans java profiler crashes with a heap overflow error at ~64mb?

I am trying to profile the memory usage of a program, but I keep getting a stack overflow error. The netbeans memory settings I am using are as follows: -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m The project memory settings I am using are as follows: -Xms256m -Xmx512m Here is screen shot. I am not sure where 6...

How can I make a library that writes to FILE * write the data to memory instead? (C programming)

I am facing a problem where the C library exposes only an interface that writes the data to a C FILE structure. This means all the data get saved to disk. I want this library to save the data to memory instead. Is there a way to emulate FILE structure in my code and make it save the data in memory instead? I imagine FILE has various poi...

What is the correct usage of realloc()?

Can anyone summarize what is the correct usage of realloc()? What do you do when realloc() fails? From what I have seen so far, it seems that if realloc() fails, you have to free() old pointer. Is that true? Here is an example: 1. char *ptr = malloc(sizeof(*ptr) * 50); 2. ... 3. char *new_ptr = realloc(ptr, sizeof(*new_pt...