I'm trying to implement the sieve of eratosthenes in python, however when trying to find all primes up to the sqare root of for instance 779695003923747564589111193840021 I get an error saying result of range() has too many items. My question is, how do I avoid this problem, if I instantiate the list with a while loop I will get an error...
I'm running through some memory profiling for my application in SDK 3.2 and I used the 'Leak' profiler to find all my memory leaks and I plugged all of them up. This is a scrollView navigationController application where there are tiles and you click a tile which goes to a new view of tiles and so on, I can go many levels deep and come ...
I'm using the program to send data from database to the Excel file .
It works fine at the beginning and then becomes more and more slowly,finally it run out of the memory and the following error ocurrs: "java.lang.OutOfMemoryError: Java heap space...".
The problem can be resolved by adding the jvm heap sapce.But the question is that it...
Hi,
I'm having some troubles with the code below:
NSSortDescriptor *idDescriptor = [[[NSSortDescriptor alloc] initWithKey:key ascending:ascending] autorelease];
NSArray *sortDescriptors = [NSArray arrayWithObject:idDescriptor];
NSArray *orderArray = [array sortedArrayUsingDescriptors:sortDescriptors];
NSMutableArray *result = [NSMuta...
Hi all,
I remember from past having a utility that would allow to leak various system resources, such as memory, handles and gdi. It had a small dialog where one would choose what to leak, it was nice for system stress testing.. I don't remember whether it was part of VC6 or I got it from somewhere else.
If you know such tool, please l...
How to measure the total memory consumption of the current process programatically in .NET?
...
I would like to generate (and then print or save) big XPS documents (>400 pages) from my WPF application. We have some large amount of in-memory data that needs to be written to XPS.
How can this be done without getting an OutOfMemoryException? Is there a way I can write the document in chunks? How is this usually done? Should I not ...
Hi there,
I'm currently developing a portal application that will require a number of Adobe flex elements. Each portlet could potentially be it's own flash movie. What I would like to know is how many of these portlets can be rendered in a browser on an average system before the number flash player starts using up too much memory and pe...
Hi,
I have quite massive program (>10k lines of C++ code). It works perfectly in debug mode or in release mode when launched from within Visual Studio, but the release mode binary usually crashes when launched manually from the command line (not always!!!).
The line with delete causes the crash:
bool Save(const short* data, unsigned i...
How can I reduce the number of loaded dlls When debugging in Visual C# 2008 Express Edition?
When running a visual C# project in the debugger I get an OutOfMemoryException due to fragmentation of 2GB virtual address space and we assume that the loaded dlls might be the reason for the fragmentation.
Brian Rasmussen, you made my day! :...
Say I have a couple of java runtime environments running on my system which are used by several applications. I would like to programmatically interact with these applications by reading their memory.
A typical approach would be to directly look into this application's memory, however for java applications this seems to be practically i...
This question is derived of the topic:
http://stackoverflow.com/questions/2280655/vector-reserve-c
I am using a datastructur of the type vector<vector<vector<double> > >. It is not possible to know the size of each of these vector (except the outer one) before items (doubles) are added. I can get an approximate size (upper bound) on th...
hi,
i wrote a little test programm which queries the status servlet of a tomcat an fetches the memory information of the jvm (free,total,max). Is there a way to get more information ?
Like CPU, memory of the process, system memory and so on. I know that some of these things may possible to get somehow because there are tools (e.g. probe...
I am working on an assignment for networking where we are supposed to create a networking library in C and then use it in our C++ program. My C++ isn't as strong as my C so I got started on that first so I could tackle any problems that came up, and I present you my first one. :D
I have a base class and an inherited class (there will ev...
I'm running Mac OS 10.6. I want to run top to get memory usage, but not in interactive mode, or any mode that updates. I just want memory usage at that point in time then return to prompt. I've looked for other utilities to get memory usage... but came up short (vm_stat is for virtual memory). Can someone direct me how to get top or some...
My web application needs to call a .NET assembly which seems to me that allocates "a lot" of memory for a web application (perhaps I'm wrong, that's why I'm asking).
I already call this assembly from my desktop application and, with the help of Task Manager, I realize that it consumes about 60MB when it runs (it is fast though: it take...
I was looking for a book, text, post or something talking about iPhone optimization but I couldn't find anything except for Apple documentation.
I think it would be great to talk about which are the common steps you do when optimizing your apps performance. I'm now trying to improve my app memory usage and I've figured out it is really ...
We've spent the last few months tuning our production application so that we experience no full GCs. We now experience young GCs only, with the rate of young GCs dependent on the rate of object allocation.
Our application needs to be as close to "real-time" as possible so now we're trying to reduce the number of young GCs. As the old ax...
I’m trying to decide the best way to load data into my app, it’s basically a book, but I want to have control of the chapter line number and chapter name ( so I can add comments and notes under relevant lines) etc. Both options allow me to do this. There’s going to be about 25 large-ish chapters.
What would be the best overall in term...
I am writing an embedded app. In some places, I use std::ostringstream a lot, since it is very convenient for my purposes. However, I just discovered that the performance hit is extreme since adding data to the stream results in a lot of calls to malloc and free. Is there any way to avoid it?
My first thought was making the ostringstrea...