out-of-memory

How to solve memory segmentation and force FastMM to release memory to OS?

こ雲淡風輕ζ 提交于 2019-12-03 15:34:40
Note: 32 bit application, which is not planned to be migrated to 64 bit. I'm working with a very memory consuming application and have pretty much optimized all the relevant paths in respect to memory allocation/de-allocation. (there are no memory leaks, no handle leaks, no any other kind of leaks in the application itself AFAIK and tested. 3rd party libs which I cannot touch are of course candidates but unlikely in my scenario) The application will frequently allocate large single and bi-dimensional dynamic arrays of single and packed records of up to 4 singles. By large I mean 5000x5000 of

How to maxmise the largest contiguous block of memory in the Large Object Heap

女生的网名这么多〃 提交于 2019-12-03 15:33:41
The situation is that I am making a WCF call to a remote server which is returns an XML document as a string. Most of the time this return value is a few K, sometimes a few dozen K, very occasionally a few hundred K, but very rarely it could be several megabytes (first problem is that there is no way for me to know). It's these rare occasions that are causing grief. I get a stack trace that starts: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at System.Xml.BufferBuilder.AddBuffer() at System.Xml.BufferBuilder.AppendHelper(Char* pSource, Int32 count)

How to deal with big strings and limited memory

泪湿孤枕 提交于 2019-12-03 13:33:33
问题 I have a file from which I read data. All the text from this file is stored in a String variable (a very big variable). Then in another part of my app I want to walk through this string and extract useful information, step-by-step (parsing the string). In the meanwhile my memory gets full and an OutOfMemory exception keeps me from further processing. I think it would be better to process the data directly while reading the inputstream from the file. But for organizational aims, I would like

How to merge >1000 xml files into one using Java

风格不统一 提交于 2019-12-03 12:57:37
问题 I am trying to merge many xml files into one. I have successfully done that in DOM, but this solution is limited to a few files. When I run it on multiple files >1000 I am getting a java.lang.OutOfMemoryError. What I want to achieve is where i have the following files file 1: <root> .... </root> file 2: <root> ...... </root> file n: <root> .... </root> resulting in: output: <rootSet> <root> .... </root> <root> .... </root> <root> .... </root> </rootSet> This is my current implementation:

Cannot allocate memory: fork: Unable to fork new process?

自闭症网瘾萝莉.ら 提交于 2019-12-03 12:32:14
We have our hosting in aws . Recently after moving our blog from wordpress to aws , we are experiencing noticeable delay in server response time. Mainly while accessing the blog. Below are the logs from the error_log file, [Wed Feb 25 06:10:10 2015] [error] (12)Cannot allocate memory: fork: Unable to fork new process [Wed Feb 25 06:12:22 2015] [error] (12)Cannot allocate memory: fork: Unable to fork new process [Wed Feb 25 06:12:36 2015] [error] (12)Cannot allocate memory: fork: Unable to fork new process [Wed Feb 25 06:12:50 2015] [error] (12)Cannot allocate memory: fork: Unable to fork new

MemoryFailPoint always throws an InsufficientMemoryException even when memory is available

好久不见. 提交于 2019-12-03 12:30:30
问题 I have written the following code to check for sufficient memory, while (true) { try { // Check for available memory. memFailPoint = new MemoryFailPoint(250); break; } catch (InsufficientMemoryException ex) { if (memFailPoint != null) { memFailPoint.Dispose(); } Thread.Sleep(waitSecond * 1000); } } I am running the above in a console application on a Windows 7 64-bit machine. There are 4 calls every 10 seconds to this method. Initially it works fine, but after 2-3 hours, there is always an

Android clear webview thread, free memory, avoid OutOfMemoryError

僤鯓⒐⒋嵵緔 提交于 2019-12-03 12:03:00
I am displaying a fairly large image in a webview so that the pinch-to-zoom functions and other conveniences for viewing are already available. It displays correctly the first time. But after leaving the activity and coming back to it, the app crashes on an OutofMemoryError related to the webview thread. I have attempted several things to try to close the webview or stop the thread, or clear its use of memory, but to no avail. Here are examples of code that I added to my activities' onStop() function wv.stopLoading(); wv.clearCache(true); //removeView(wv); wv.clearView(); wv.freeMemory(); wv

google maps api v2 out of memory error

醉酒当歌 提交于 2019-12-03 11:25:40
问题 i have a huge memory problem in my app. i am using google map api v2 with ClusterManager and custom markers. i supply an image via call to markerOptions.icon(BitmapDescriptorFactory.fromBitmap(bitmap)); for each marker based on its category. the problem is: after several screen rotations my app crashes because of OOM error: 05-14 11:04:12.692 14020-30201/rokask.rideabike E/art﹕ Throwing OutOfMemoryError "Failed to allocate a 4194316 byte allocation with 1627608 free bytes and 1589KB until OOM

Pickle File too large to load

最后都变了- 提交于 2019-12-03 11:23:48
问题 The problem that I am having is that I have a very large pickle file (2.6 Gb) that I am trying to open but each time I do so I get a memory error. I realize now that I should have used a database to store all the information but its too late now. The pickle file contains dates and text from the U.S. Congressional record that was crawled from the internet (took about 2 weeks to run). Is there any way I can access the information that I dumped into the pickle file incrementally or a way to

Why isn't IIS cleaning up the old worker processes (w3wp.exe) on pool recycle leading to website out of memory exception?

旧城冷巷雨未停 提交于 2019-12-03 09:30:58
I have an asp.net-mvc site and recently I am getting an out of memory exceptions on my web server. I only have 1 application pool and we recent set IIS to recycle after it hits a certain limit. I went in the other day and saw 4 w3wp.exe processes running (each with ~1.8GB memory being used) I assume that during the recycle process, it's not killing the old worker process and eventually I get out of memory exceptions on my website because the box only has 8GB memory. I can add memory to the box but I am concerned why these old processes are not being cleaned up. Are there any recommendations to