You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MemoryManager.Core/AllocationPriority.cs
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,24 @@
8
8
9
9
namespaceMemoryManager.Core
10
10
{
11
+
/// <summary>
12
+
/// Priority of the Allocation, this can be used to determine the order in which allocations are made when multiple allocations are requested at the same time. This can be useful for optimizing performance and ensuring that critical allocations are made first.
13
+
/// </summary>
11
14
publicenumAllocationPriority
12
15
{
16
+
/// <summary>
17
+
/// The critical Priority, these allocations are the most important and should be allocated first. They are likely to be used for critical game systems or performance-sensitive code.
18
+
/// </summary>
13
19
Critical=0,
20
+
21
+
/// <summary>
22
+
/// The normal, Priority, these allocations are important but not as critical as the critical ones. They may be used for general game logic or less performance-sensitive code.
23
+
/// </summary>
14
24
Normal=1,
25
+
26
+
/// <summary>
27
+
/// The low, Priority, these allocations are the least important and should be allocated last. They may be used for non-essential game features or background tasks that can tolerate delays in allocation.
Copy file name to clipboardExpand all lines: MemoryManager.Core/BlobEntry.cs
+20-1Lines changed: 20 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
* COPYRIGHT: See COPYING in the top level directory
3
3
* PROJECT: MemoryManager.Core
4
4
* FILE: BlobEntry.cs
5
-
* PURPOSE: Your file purpose here
5
+
* PURPOSE: A struct representing metadata for a blob allocation within the memory arena, tracking its identifier, offset, size, allocation frame, and version for management and debugging purposes.
* COPYRIGHT: See COPYING in the top level directory
3
+
* PROJECT: MemoryManager.Lanes
4
+
* FILE: MemoryCanary.cs
5
+
* PURPOSE: Centralized unmanaged guard band validation with zero RELEASE overhead.
6
+
* PROGRAMMER: Peter Geinitz (Wayfarer)
7
+
*/
8
+
9
+
usingSystem.Runtime.CompilerServices;
10
+
11
+
namespaceMemoryManager.Lanes
12
+
{
13
+
/// <summary>
14
+
/// Canary class provides a simple mechanism for detecting buffer overruns and underruns in debug builds by placing known "canary" values before and after user allocations.
15
+
/// In release builds, the canary logic is completely stripped out to ensure zero overhead,
16
+
/// making it an effective tool for catching memory corruption issues during development without impacting performance in production.
17
+
/// </summary>
18
+
internalstaticclassMemoryCanary
19
+
{
20
+
/// <summary>
21
+
/// The size
22
+
/// </summary>
23
+
publicconstintSize=4;// 4 bytes for a uint marker
24
+
25
+
/// <summary>
26
+
/// The magic
27
+
/// </summary>
28
+
privateconstuintMagic=0xDEADBEEF;
29
+
30
+
/// <summary>
31
+
/// Calculates the total physical footprint needed in the allocator block pool.
32
+
/// </summary>
33
+
/// <param name="userSize">Size of the user.</param>
0 commit comments