Daily update on 20260308-235635 by Nitload Youmu. Additional Message : designing types for L4 function mosule

Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
Nitload
2026-03-08 23:56:35 +08:00
parent 64360b63a1
commit ae8238fca2
5 changed files with 202 additions and 20 deletions
+10 -13
View File
@@ -26,6 +26,7 @@
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Collections;
using StgSharp.Mathematics.Memory;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -34,25 +35,21 @@ using System.Threading.Tasks;
namespace StgSharp.HighPerformance.Memory
{
public unsafe class L4
public unsafe partial class L4
{
private readonly byte* _buffer;
private readonly SwissTable _map;
public nint MapMemory(nint address)
private SlabAllocator<EvictionRingNode> EntryAllocator { get; set; }
private SlabAllocator<CacheLine> CacheLineAllocator { get; set; }
public struct CacheLine
{
if (_map.TryGet(address, out nint ptr))
{
return ptr;
} else
{
/*
* register a request for memory mapping,
* and return a pointer to the mapped memory.
*/
return 0;
}
public fixed byte Data[64];
}
}