View Single Post
Old 10 May 2020, 12:59   #396
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,232
The exec memory allocation is prone to fragmentation, true. However, there are applications that depend on is specific implementation, that walk the exec memory list itself as its structures are public. There are also applications that play certain tricks with the memory list, such as to fetch memory aligned to certain boundaries.

As far as fragmentation is concerned, the two biggest causes of fragmentation are the layer cliprect allocation, which re-allocated clip rects on every window re-arrangement, and the graphics region management, which reallocates regions on every damage done to a simple refresh window.

The first cause has been addressed in 3.1.4, as layers pools now cliprects and recycles them, avoiding to go through the exec memory list. There is one cliprect pool per LayerInfo, the layer counterpart of an intuition screen.

The second cause has been addressed in 3.1.4 as well, where graphics now pools all regions and regionrectangles, also helping to speed up damage operations.

What may help is an exec "scratch list" of small memory fragments. PoolMem keeps such a list. But the implementation is touchy as it needs to address the above tricks for aligned allocation or precise return codes some applications (illegally) depend upon.
Thomas Richter is online now  
 
Page generated in 0.07805 seconds with 11 queries