memory

Is there any way of preventing application from crashing when heap is corrupted? - C programing language

Hi, Sometimes in execution I get this error message in VS2010 when trying to free memory: Windows has triggered a breakpoint in [APPNAME].exe. This may be due to a corruption of the heap, which indicates a bug in [APPNAME].exe or any of the DLLs it has loaded. This may also be due to the user pressing F12 while [APPNAME].e...

trouble reading from __global memory after atom_inc in OpenCL

OpenCL doesn't have a global barrier that will stop all threads, so I'm trying to create a work around with the following code: void barrier(__global uint* scratch) { uint nThreads = get_global_size(0); atom_inc(scratch); /* this loop never terminates */ while(scratch[0] < nThreads) { continue; } } The idea is that each ...

Is it safe to use the "hash" method to track NSURLConnections in memory?

My question is related to this discussion: http://www.cocoabuilder.com/archive/cocoa/202211-how-to-get-nsurl-form-nsurlconnection.html I am sending several NSURLConnections to transmit data and need to be able to tell which specific connection failed or succeeded. There are NSURLDelegate methods (didFailWithError, etc) which return the ...

In python, how can I load a sqlite db completely to memory before connecting to it?

I have a 100 mega bytes sqlite db file that I would like to load to memory before performing sql queries. Is it possible to do that in python? Thanks ...

hibernate's objects eating up jboss's jvm heap

hi folks, am seeing consistent Out of Memory Exceptions due to Hibernate objects consuming over 50% of the heap. (over 500M) Am using EntityManager for persistence PersitanceBag and Collection Entry are some of them and there are some HashMaps as well contributed by Hibernate. Please advise if there is any procedure to get rid of them...

MSIL Memory Leaks

Hi All We are using a custom RuntimeDataBuilder class that dynamically constructs a .NET type in-memory using Reflection.Emit to create simple property getters/setters for the information that we receive from a generic WCF DataService. The service exposes a "DataSet like" structure consisting out of 1..m DataTableDefinitions each conta...

Memory problem in Winforms application - Memory increases on each search and bind activity.

I have memory problem in my application. Each time I fetch data from db and assign it to Grid, memory increases and sometimes when extensive searches are made the memory reaches to 1 G.B. There can be other memory handling issues but to test that searching and binding data repeatedly consumes good amount of memory I have created a new w...

MySQL Text Fields and Memory Usage

I am working on an application that allows users to dynamically add questions to web forms. We use MySQL as the backend, and I am trying to find the fastest, most efficient way of storing the form data. Previously, we stored the data in a separate table for each form section. The columns were named according to a system that allowed u...

Should I arrange variable declarations for word alignment in Java?

In C/C++ it is a common practice to arrange field declarations in often-used structs so that fields of various sizes are packed tightly together, and aligned to word boundaries whenever possible. Code readability is sacrificed for machine efficiency. Is the same practice worthwhile for Java? Does real-world Java compilers/VMs re-arrange ...

iPad memory management

Hello! I have made an iPad application that uses the Apple sample code called "PageControl". I did some changes to it, so i can load local HTML files inside an UIWebView ,inside an UIScrollView. Those HTML files uses CSS to style the layout, and javascript to get some small animations and transitions. The HTML file can also contain vide...

Find memory leak in a Ruby on Rails project

I have a Ruby on Rails project with what seems to be a memory leak. It keeps using more and more memory until it crashes. Dumping the amount of objects per class using ObjectSpace I've found this: Name Count ---------------------------------------------------------------------...

C# How to report nonspecific memory usage.

So I'm trying demonstrate to my uppers that the product contains a memory leak. However, it takes about 2 hours of running a script that touches a COM object to duplicate up to an OutOfMemoryException. In order to make this presentable, I'll need data for a baseline to show that it's not my script itself that's causing the memory proble...

CALayer memory usage on draw - implicit cache?

Hello everyone. I'm having a peculiar problem with CoreGraphics/CoreAnimation on the iPhone. To better explain how the problem manifests itself, I'll walk you through my current setup and illustrate with code where appropriate. I'm trying to draw a bunch of preloaded images in a UIView's CALayer, but whenever the image displays, the ap...

STL containers memory issue

I'm implementing my own graph library in linux (Fedora 10 and CentOS 5) with gcc 4.3.2 and using STL containers then I found some problems with memory. When I build my graph, I use a lot of memory enough to be view in top or another memory usage tool. I'm sure that I'm deallocating that memory (I reviewed the code again and again and I u...

Test for void pointer in C++ before deleting

I have an array in C++: Player ** playerArray; which is initialized in the constructor of the class it is in. In the destructor I have: delete playerArray; except when testing the program through Valgrind it says that there are some calls to delete to a void pointer: operator delete(void*) I want to test whether the playerArr...

Configure Visual Studio to use more ram

I read a blog post at one time on how to increase the amount of RAM that Visual Studio will use. I am getting a "Not enough memory free" error message when trying to copy a small line of text in the visual studio editor. Does anybody know how or where I can configure this? ...

sqlite memory mode support persistence to local?

i didn't know what's meaning of memory database,dose sqlite is a memory database? on this mode,is it support persistence data to local file? ...

PHP application running out of Memory

Hi Guys, I am writing a set of classes for a crawler, it crawls a start page, pulls three links based on parameters (found using Simple Html Dom Parser allowing use of jquery like selectors), crawls those pages, then goes to page 2, picks the next 3 pages. Current max pages is 57 times. Needless to say I am getting: Allowed memory si...

Determining the availability of sufficient memory for an operation

Can we Determine the availability of sufficient memory for an operation? if yes, then how can? Thanks ...

Using Sos (dumpheap etc) from test code?

Hi, I've recently tracked down a memory leak in my application and I'd like to add a test case to check that it stays that way. What I want to do is this: int numberOfInstancesBeforeFunction = GetNumberOfInstancesInMemory(typeof(MyClass)); PerformFunction(); GC.Collect(); int numberOfInstancesAfterFunction = GetNumberOfInstances...