fragmentation

Avoiding OutOfMemoryException during large, fast and frequent memory allocations in C#

房东的猫 提交于 2019-11-29 12:29:24
问题 Our application continuously allocates arrays for large quantities of data (say tens to hundreds of megabytes) which live for a shortish amount of time before being discarded. Done naively this can cause large object heap fragmentation, eventually causing the application to crash with an OutOfMemoryException despite the size of the currently live objects not being excessive. One way we have successfully managed this in the past is to chunk up the arrays to ensure they don't end up on the LOH,

Android : Notification not working on 2.3.6 (Samsung galaxy y)

佐手、 提交于 2019-11-29 11:45:27
The following code has been confirmed to work fine on devices running HONEYCOMB+. However on Samsung galaxy Y it is not producing any notifications. String tickerText = userString + " Download Queued"; Notification notification = new NotificationCompat.Builder(this).setAutoCancel(true) .setContentTitle(userString) .setContentText("Queued") .setSmallIcon(R.drawable.stat_sys_download_done) .setWhen(System.currentTimeMillis()) .setTicker(tickerText) .build(); if(DBG_ENABLE) { LogUtils.logD(TAG_LOG, "Posting queue notification : " + 0); } NotificationManager notificationManager =

Does multithreading emphasize memory fragmentation?

↘锁芯ラ 提交于 2019-11-28 20:06:23
Description When allocating and deallocating randomly sized memory chunks with 4 or more threads using openmp's parallel for construct, the program seems to start leaking considerable amounts of memory in the second half of the test-program's runtime. Thus it increases its consumed memory from 1050 MB to 1500 MB or more without actually making use of the extra memory. As valgrind shows no issues, I must assume that what appears to be a memory leak actually is an emphasized effect of memory fragmentation. Interestingly, the effect does not show yet if 2 threads make 10000 allocations each, but

Android : Notification not working on 2.3.6 (Samsung galaxy y)

北战南征 提交于 2019-11-28 05:00:50
问题 The following code has been confirmed to work fine on devices running HONEYCOMB+. However on Samsung galaxy Y it is not producing any notifications. String tickerText = userString + " Download Queued"; Notification notification = new NotificationCompat.Builder(this).setAutoCancel(true) .setContentTitle(userString) .setContentText("Queued") .setSmallIcon(R.drawable.stat_sys_download_done) .setWhen(System.currentTimeMillis()) .setTicker(tickerText) .build(); if(DBG_ENABLE) { LogUtils.logD(TAG

How to avoid heap fragmentation?

断了今生、忘了曾经 提交于 2019-11-27 20:43:44
I'm currently working on a project for medical image processing, that needs a huge amount of memory. Is there anything I can do to avoid heap fragmentation and to speed up access of image data that has already been loaded into memory? The application has been written in C++ and runs on Windows XP. EDIT: The application does some preprocessing with the image data, like reformatting, calculating look-up-tables, extracting sub images of interest ... The application needs about 2 GB RAM during processing, of which about 1,5 GB may be used for the image data. If you are doing medical image

Does multithreading emphasize memory fragmentation?

旧时模样 提交于 2019-11-27 12:57:09
问题 Description When allocating and deallocating randomly sized memory chunks with 4 or more threads using openmp's parallel for construct, the program seems to start leaking considerable amounts of memory in the second half of the test-program's runtime. Thus it increases its consumed memory from 1050 MB to 1500 MB or more without actually making use of the extra memory. As valgrind shows no issues, I must assume that what appears to be a memory leak actually is an emphasized effect of memory

Script for rebuilding and reindexing the fragmented index?

五迷三道 提交于 2019-11-27 05:29:10
问题 Can anyone provide the script for rebuilding and re-indexing the fragmented index when 'avg_fragmentation_in_percent' exceeds certain limits (better if cursor is not used)? 回答1: To rebuild use: ALTER INDEX __NAME_OF_INDEX__ ON __NAME_OF_TABLE__ REBUILD or to reorganize use: ALTER INDEX __NAME_OF_INDEX__ ON __NAME_OF_TABLE__ REORGANIZE Reorganizing should be used at lower (<30%) fragmentations but only rebuilding (which is heavier to the database) cuts the fragmentation down to 0%. For further

How to avoid heap fragmentation?

放肆的年华 提交于 2019-11-26 20:26:17
问题 I'm currently working on a project for medical image processing, that needs a huge amount of memory. Is there anything I can do to avoid heap fragmentation and to speed up access of image data that has already been loaded into memory? The application has been written in C++ and runs on Windows XP. EDIT: The application does some preprocessing with the image data, like reformatting, calculating look-up-tables, extracting sub images of interest ... The application needs about 2 GB RAM during

What causes memory fragmentation in .NET

孤街醉人 提交于 2019-11-26 15:44:45
问题 I am using Red Gates ANTS memory profiler to debug a memory leak. It keeps warning me that: Memory Fragmentation may be causing .NET to reserver too much free memory. or Memory Fragmentation is affecting the size of the largest object that can be allocated Because I have OCD, this problem must be resolved. What are some standard coding practices that help avoid memory fragmentation. Can you defragment it through some .NET methods? Would it even help? 回答1: You know, I somewhat doubt the memory

What is memory fragmentation?

一曲冷凌霜 提交于 2019-11-26 03:16:27
问题 I\'ve heard the term \"memory fragmentation\" used a few times in the context of C++ dynamic memory allocation. I\'ve found some questions about how to deal with memory fragmentation, but can\'t find a direct question that deals with it itself. So: What is memory fragmentation? How can I tell if memory fragmentation is a problem for my application? What kind of program is most likely to suffer? What are good common ways to deal with memory fragmentation? Also: I\'ve heard using dynamic