memory

trying to store java objects in contiguous memory

Hi all, I am trying to implement a cache-like collection of objects. The purpose is to have fast access to these objects through locality in memory since I'll likely be reading multiple objects at a time. I currently just store objects in a java collections object like vector or deque. But I do not believe this makes use of contiguou...

Exception handling and memory

This may be a strange question, but do 'try-catch' blocks add any more to memory in a server environment than just running a particular block of code. For example, if I do a print stack trace, does the JVM hold on to more information. Or is more information retained on the heap? try { ... do something() } catch(Exception e) { e.pri...

Determine whether memory location is in CPU cache.

It is possible for an operating system to determine whether a page of memory is in DRAM or in swap; for example, simply try to access it and if a page fault occurs, it wasn't. However, is the same thing possible with CPU cache? Is there any efficient way to tell whether a given memory location has been loaded into a cache line, or to ...

DbConnection without Db using in-memory DataSet (or similar) as source

I'm trying to unit test a few .NET classes that (for good design reasons) require DbConnections to do their work. For these tests, I have certain data in memory to give as input to these classes. That in-memory data could be easily expressed as a DataTable (or a DataSet that contains that DataTable), but if another class were more appr...

Minimizing the memory footprint of an ADO.NET DataSet?

Given a legacy system that is making heavy use of DataSets and little or no possibility of replacing these with business objects or other, more efficient data structures: Are there any techniques for reducing the memory footprint of a DataSet? I am thinking about things like setting initial capacity (when known), removing restrictions,...

Any recommendation for IE 6 / 7 Javascript Memory Inspection tool?

I am looking for an IE 6 / 7 plug-in or something like Firebug_Lite thing that can show the memory usage in runtime, as well as the allocation of memory of each object or variable. Anyone know what tool has this functionality? Thanks. ...

Visual studio on windows xp

i need to run a few visual studios on windows XP and it seems to take up a lot of memory. i am also running resharper which is a memory hog. i am running 32 bit XP. How much memory can i put into my machine until i get to the point where the OS hits its limit. Also, any other ways of running multiple visual studio without such slow pe...

How to get the memory a function consumes

Our application consumes lots of memory and we need to identify which function cause the maximum usage of the memory. Is their any way or even any existing tool to do this(Windows, Native)? Here is the environment: Windows Xp VS2008 Native C++ (MFC Based) Thanks so much. ...

Is there a way to find out what the maximum number of bytes available is when using malloc in c?

Or do you just have to do it and check errno and/or the pointer to see if you succeeded? ...

Finding where memory was last freed?

Very general: Is there an easy way to tell which line of code last freed a block of memory when an access violation occurs? Less general: My understanding of profilers is that they override the allocation and deallocation processes. If this is true, might they happen to store the line of code that last freed a section of memory so that...

Why do Cocoa apps use so much memory?

Even the standard blank-window Cocoa app that gets built when you make a new Cocoa project in Xcode uses almost 6 MB of memory. What's the reason for this? Is it possible to make an app use less, or does OS X simply manage memory differently for Cocoa apps? Not that I'm complaining. I know that performance "hardly matters anymore" (edit...

How do you make diagrams of memory and data structures?

I have to create a short program in C that manipulates strings, but I always run into some weird pointer errors. While K&R is a great reference on the language, and I often look at it when I am puzzled it already assumes you are an adequate programmer. The lecturer that teaches us programming said that good programmers make nice diagra...

How can I categorize the memory usage of a NON-.NET application/DLL ?

I have a 32-bit Visual Studio 8.0 C++ Windows DLL (non-.NET) that appears to be taking up more memory than I would expect. I want to determine exactly where the memory is going, not just a single figure of the total memory used (not interested in Task Manager or Resource Monitor's memory usage values). Back in 16-bit days HeapWalker was...

Py3k memory conservation by returning iterators rather than lists

Many methods that used to return lists in Python 2.x now seem to return iterators in Py3k Are iterators also generator expressions? Lazy evaluation? Thus, with this the memory footprint of python is going to reduce drastically. Isn't it? What about for the programs converted from 2to3 using the builtin script? Does the builtin tool e...

Table operation .net library

In some webpages that I have, I must join some datatables in memory and then use the result as a datasource for a gridview. This in-memory join is the only solution, and I have written a method that takes care of it. I was wondering if there is any library out there that can do such things and other table operations, like ordering and...

Get current memory utilisation of a process running on a remote machine with WMI.

I want to write a VB script that will return the current memory utilisation of a process on a remote machine. I'm currently getting the info by greping the output of pslist.exe but that's not ideal. ...

Creating memory stream from ResponseStream Out of Memory Exception

I am making a call to a httprequest which returns a pdf file in the responsestream. This works well for smaller pdf's, but not the file is up around 25-30MB, it is returning an out of memory exception. MemoryStream memStream = new MemoryStream(); byte[] buffer = new byte[2048]; int bytesRead = 0; do ...

Using RSLs with Adobe AIR

Does anyone know how exactly RSLs work with AIR? I have a terminal server that runs several instances of a very large AIR application, which unfortunately has 100M RAM on startup and 200 after a bit of use. This is obviously not really workable, and I'm thinking that RSLs may be a solution if they're cached on the machine. However I have...

Why can't I leverage 4GB of RAM in my computer to process less than 2GB of information in C#?

Scenario: over 1.5GB of text and csv files that I need to process mathematically. I tried using SQL Server Express, but loading the information, even with BULK import takes a very long time, and ideally I need to have the entire data set in memory, to reduce hard disk IO. There are over 120,000,000 records, but even when I attempt to fi...

would this cause an memory leak in iPhone?

- (void)viewDidLoad { [super viewDidLoad]; landscape.image = [UIImage imageNamed:@"tenerife1.png"]; } I assign that new UIImage to the image property of an UIImageView object. I am not sure if that would result in an memory leak? ...