heap-fragmentation

Heap fragmentation in 64 bit land

折月煮酒 提交于 2019-12-18 19:17:39
问题 In the past, when I've worked on long-running C++ daemons I've had to deal with heap fragmentation issues. Tricks like keeping a pool of my large allocations were necessary to keep from running out of contiguous heap space. Is this still an issue with a 64 bit address space? Perf is not a concern for me, so I would prefer to simplify my code and not deal with things like buffer pools anymore. Does anyone have any experience or stories about this issue? I'm using Linux, but I imagine many of

How to monitor or visualize memory fragmentation of a delphi application

混江龙づ霸主 提交于 2019-12-18 12:24:04
问题 How can I monitor or visualize memory fragmentation of a delphi application? 回答1: Most Delphi applications use FastMM now, and if you have the source code version linked in you can use the FastMMUsageTracker.pas file which creates a separate window showing how memory is used updated every second or so. I took the code in that file and created a version which logs to file, so that I could use it in a service, but for a desktop app that standard tracker will work well. 来源: https://stackoverflow

When to address managed heap fragmentation

老子叫甜甜 提交于 2019-12-18 09:13:59
问题 I was reading a blog entry by Josh Smith where he used a cache mechanism in order to "reduce managed heap fragmentation". His caching reduces the number of short-lived objects being created at the cost of slightly slower execution speed. How much of a problem is managed heap fragmentation in a managed language like C#? How can you diagnose if it's an issue? In what situations would you typically need to address it? 回答1: When Not too quickly. It is generally very cheap to have short lived

Is my heap fragmented

三世轮回 提交于 2019-12-10 02:35:03
问题 0:000> !dumpheap -stat total 1755874 objects Statistics: MT Count TotalSize Class Name 7b9b0c64 1 12 System.Windows.Forms.Layout.TableLayout+ColumnSpanComparer .... 7933303c 14006 4926456 System.Collections.Hashtable+bucket[] 65246e00 804 4982192 System.Data.RBTree`1+Node[[System.Int32, mscorlib]][] 054c55f0 44240 5662720 DevExpress.Utils.AppearanceObject 793040bc 98823 7613156 System.Object[] 793308ec 293700 55820016 System.String 002435f0 50315 138631888 Free Total 1755874 objects

Is my heap fragmented

谁说胖子不能爱 提交于 2019-12-05 04:01:48
0:000> !dumpheap -stat total 1755874 objects Statistics: MT Count TotalSize Class Name 7b9b0c64 1 12 System.Windows.Forms.Layout.TableLayout+ColumnSpanComparer .... 7933303c 14006 4926456 System.Collections.Hashtable+bucket[] 65246e00 804 4982192 System.Data.RBTree`1+Node[[System.Int32, mscorlib]][] 054c55f0 44240 5662720 DevExpress.Utils.AppearanceObject 793040bc 98823 7613156 System.Object[] 793308ec 293700 55820016 System.String 002435f0 50315 138631888 Free Total 1755874 objects Fragmented blocks larger than 0.5 MB: Addr Size Followed by 15a195c8 0.8MB 15ae3950 System.Collections.ArrayList

Heap fragmentation in 64 bit land

三世轮回 提交于 2019-11-30 17:31:21
In the past, when I've worked on long-running C++ daemons I've had to deal with heap fragmentation issues. Tricks like keeping a pool of my large allocations were necessary to keep from running out of contiguous heap space. Is this still an issue with a 64 bit address space? Perf is not a concern for me, so I would prefer to simplify my code and not deal with things like buffer pools anymore. Does anyone have any experience or stories about this issue? I'm using Linux, but I imagine many of the same issues apply to Windows. Is this still an issue with a 64 bit address space? No, it is not

Where is my iPad runtime memory going?

徘徊边缘 提交于 2019-11-29 01:15:09
问题 I'm causing the device (iPad) to run out of memory apparently, so it is jettisoning my app. I'm trying to understand what is going on as Instruments is telling me that I'm using about 80Mb, and there is no other app running on the device. I found this code snippet to ask the Mach system under iOS for the memory stats: #import <mach/mach.h> #import <mach/mach_host.h> static void print_free_memory () { mach_port_t host_port; mach_msg_type_number_t host_size; vm_size_t pagesize; host_port = mach

Memory Fragmentation Profiler

≡放荡痞女 提交于 2019-11-28 22:36:31
问题 Are there any good memory fragmentation profilers? (linux gcc version would be nice). Valgrind cannot analyze this because it uses custom malloc/free functions. Thanks, Andrew 回答1: I would start with mtrace. When you have a trace, glibc comes with a perl script mtrace(1) which finds leaks. However, the trace format is easy to understand, so it should be straight-forward process this into fragmentation analysis. 回答2: I'm afraid the answer is Valgrind. You can tell Valgrind which functions are

How do I workaround heap fragmentation in a C++ server program?

两盒软妹~` 提交于 2019-11-28 05:28:41
问题 Heap fragmentation can cause a server application that is expected to run continuously for many months to suddenly start malfunctioning thinking that it's out of memory. Let's assume that I've done my best to minimize runtime heap fragmentation in my VC++ server application but still it builds up and causes problems. I could for example automatically restart the application every month or every half million requests processed - safely stop it and safely start again with a new heap. What else

What is a contiguous memory block?

眉间皱痕 提交于 2019-11-27 03:44:28
Just like in the title, what is a contiguous memory block? One without any gaps in the addresses it occupies. You can probably just think of this as a "block", and think of something with a gap in the middle as "two blocks". The term comes up in the definition of an array as being "contiguous". That means the elements are laid out end-to-end, with no discontinuities and no padding between them (there may be padding inside each element, but not between elements). So an array of 5 4-byte elements looks like this (1 underscore character per byte, the | symbols don't represent memory): ____ ____ _