Skip to content

Commit 048e94e

Browse files
author
LoneWandererProductions
committed
note down some todos
1 parent ad8187c commit 048e94e

3 files changed

Lines changed: 26 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* COPYRIGHT: See COPYING in the top level directory
3+
* PROJECT: MemoryArenaPrototype.Core
4+
* FILE: CompactionStyle.cs
5+
* PURPOSE: Defines the compaction styles for memory management strategies.
6+
* PROGRAMMER: Peter Geinitz (Wayfarer)
7+
*/
8+
9+
namespace MemoryManager.Core
10+
{
11+
public enum CompactionStyle
12+
{
13+
Full, // The current "Nuclear Reset" (Default for SlowLane)
14+
GoodEnough, // Stops the moment a target gap is opened
15+
None // Defragments strictly via free-list coalescing
16+
}
17+
}

MemoryManager.Lanes/LinearLane.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
* PROGRAMMER: Peter Geinitz (Wayfarer)
77
*/
88

9+
//TODO: Compaction optimizations:
10+
// On Free look left and right for adjacent free blocks and coalesce into a single larger block, updating the next free offset if it was at the end of the free region.
11+
// Two "Good enough" make enough space by moving a single large block instead of doing a full defrag. This would be ideal for the FastLane to quickly open up space without needing to move everything around.
12+
913
// ReSharper disable UnusedMember.Global
1014

1115
using ExtendedSystemObjects;

MemoryManager.Lanes/SlowLane.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
* PROGRAMMER: Peter Geinitz (Wayfarer)
88
*/
99

10+
// TODO Compaction
11+
// we should configure two options good enough or full compaction
12+
// via the enum CompactionStyle.
13+
// Good enough would stop as soon as a big enough gap is opened, while full would always compact everything to the start of the buffer.
14+
1015
// ReSharper disable EventNeverSubscribedTo.Global
1116

1217
using ExtendedSystemObjects;

0 commit comments

Comments
 (0)