protected override void CommitFromMemory()
        {
            foreach (SegmentStream memStream in MemSCA.GetStreams())
            {
                var memElems = StreamToStruct <RegMemElem, RegMemElem>(
                    memStream,
                    RegMemElem.SizeOfMemElem,
                    e => e
                    );

                foreach (var memElem in memElems.OrderBy(kv => kv.Value.rtxOffset))
                {
                    var lower = memElem.Value.rtxOffset - 1;
                    var upper = memElem.Value.rtxOffset + memElem.Value.rtxLength - 2;

                    if (upper < lower || upper < 0)
                    {
                        continue;
                    }

                    SparseClusteredArray <byte> .Bounds rtxBounds = new SparseClusteredArray <byte> .Bounds(
                        lower,
                        upper
                        );

                    using (SegmentStream rtStream = RtxSCA.GetSubsetStream(rtxBounds))
                    {
                        RegRtElem rtxElem = default;

                        if (rtStream != null)
                        {
                            rtxElem = ParseRtStream(rtStream,
                                                    memElem.Value);
                        }

                        Commit(memElem.Key,
                               memElem.Value,
                               rtxElem);
                    }
                }
            }

            MemSCA.Clear();
            RtxSCA.Clear();
        }
Exemple #2
0
 protected override void Cleanup()
 {
     Members.Clear();
     MemSCA.Clear();
     RtxSCA.Clear();
 }