Click here to Skip to main content
15,911,531 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Large Heap Doesn't Compact? Pin
BarV21-Aug-06 8:58
BarV21-Aug-06 8:58 
AnswerRe: Large Heap Doesn't Compact? Pin
Guffa21-Aug-06 8:47
Guffa21-Aug-06 8:47 
GeneralRe: Large Heap Doesn't Compact? Pin
BarV21-Aug-06 8:59
BarV21-Aug-06 8:59 
GeneralRe: Large Heap Doesn't Compact? [modified] Pin
Dave Kreskowiak21-Aug-06 9:19
mveDave Kreskowiak21-Aug-06 9:19 
GeneralRe: Large Heap Doesn't Compact? Pin
BarV21-Aug-06 9:33
BarV21-Aug-06 9:33 
GeneralRe: Large Heap Doesn't Compact? Pin
Dan Neely21-Aug-06 9:38
Dan Neely21-Aug-06 9:38 
GeneralRe: Large Heap Doesn't Compact? Pin
Dave Kreskowiak21-Aug-06 9:57
mveDave Kreskowiak21-Aug-06 9:57 
GeneralRe: Large Heap Doesn't Compact? Pin
Dan Neely21-Aug-06 10:05
Dan Neely21-Aug-06 10:05 
Dave Kreskowiak wrote:
Various pieces of a strcutre or class can be rearranged, but not something like an entire array. I've worked with HUGE arrays (250+MB) and those don't get compacted or moved. The holes they created stay in place until another array was allocated or an existing array expanded.


That was my point, which is how in theory the heap can fragment.

The following psudeocode will put a 10byte fragment on the large object heapthat will remain unused for the remainder of the app's runtime.

Allocate(TempObject, 1000) // in use, bytes 1-1000
Allocate(PremamantObject1, 1000) // in use, bytes 1-2000
Deallocate(TempObject) // in use, bytes 1001-2000
Allocate(PremamantObject2, 990) // in use, bytes 1-990, 1001-2000.
//Unallocated, and too small to use bytes 991-1000

In a well designed app, this won't happen often enough to be a problem, but with a sloppy design that's continually re and deallocating from the large object heap you could end up with a number of such fragments around objects that have long lifetimes. Worst case could be almost 50% loss with a sequence of minimum sized objects, and gaps one byte smaller than the minimum. If this is happening there's bad design to blame, but a heap fragmentation leak's possible in theory, which was my point.
GeneralRe: Large Heap Doesn't Compact? Pin
Dave Kreskowiak21-Aug-06 10:28
mveDave Kreskowiak21-Aug-06 10:28 
Question.net odbc provider Pin
Rothco21-Aug-06 6:41
Rothco21-Aug-06 6:41 
AnswerRe: .net odbc provider Pin
Dave Kreskowiak21-Aug-06 8:00
mveDave Kreskowiak21-Aug-06 8:00 
GeneralRe: .net odbc provider Pin
Rothco21-Aug-06 8:06
Rothco21-Aug-06 8:06 
QuestionProcess Killer Pin
DanB198321-Aug-06 6:19
DanB198321-Aug-06 6:19 
AnswerRe: Process Killer Pin
Dave Kreskowiak21-Aug-06 7:49
mveDave Kreskowiak21-Aug-06 7:49 
GeneralRe: Process Killer Pin
DanB198321-Aug-06 23:01
DanB198321-Aug-06 23:01 
QuestionGet contents from "RichEdit20W" class Pin
priyank_ldce21-Aug-06 0:47
priyank_ldce21-Aug-06 0:47 
QuestionTo run application written in .Net VC++ 2005 Pin
Andy Rama20-Aug-06 23:19
Andy Rama20-Aug-06 23:19 
AnswerRe: To run application written in .Net VC++ 2005 Pin
Keith Malwitz21-Aug-06 2:15
Keith Malwitz21-Aug-06 2:15 
AnswerRe: To run application written in .Net VC++ 2005 Pin
Jun Du21-Aug-06 5:12
Jun Du21-Aug-06 5:12 
QuestionCOFF Format ? Pin
S Pandian20-Aug-06 20:58
S Pandian20-Aug-06 20:58 
AnswerRe: COFF Format ? Pin
Guffa20-Aug-06 21:51
Guffa20-Aug-06 21:51 
AnswerRe: COFF Format ? Pin
Mike Dimmick21-Aug-06 2:23
Mike Dimmick21-Aug-06 2:23 
Questionwhen .net2003 solution is migrated to .net2005, controls are not as .net2005 Pin
Ravikumar Patra18-Aug-06 3:17
professionalRavikumar Patra18-Aug-06 3:17 
AnswerRe: when .net2003 solution is migrated to .net2005, controls are not as .net2005 Pin
Jun Du18-Aug-06 5:17
Jun Du18-Aug-06 5:17 
QuestionHow can i change the base address of my dll? Pin
Timothy_198218-Aug-06 2:08
Timothy_198218-Aug-06 2:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.