Exemple #1
0
 public void Attach(IntPtr memSeg)
 {
     _memSegPtr     = memSeg;
     _lastMemSegPtr = memSeg;
     unsafe
     {
         _memSegDataPtr = (byte *)(void *)MemorySegment.GetDataPtr(memSeg);
     }
     _memSegSize       = MemorySegment.GetUsed(memSeg);
     _memSegReadIndex  = -1;
     _memSegWriteIndex = -1;
     _globalReaded     = 0;
     _globalWrited     = 0;
     _released         = false;
 }
Exemple #2
0
 unsafe private void SetCurrentMemSeg(IntPtr memSegPtr)
 {
     _memSegPtr     = memSegPtr;
     _memSegSize    = MemorySegment.GetUsed(_memSegPtr);
     _memSegDataPtr = (byte *)(void *)MemorySegment.GetDataPtr(_memSegPtr);
 }