Exemplo n.º 1
0
            public ManagedMemorySectionEntriesCache(ManagedMemorySectionEntries ss)
            {
                Count   = ss.GetNumEntries();
                dataSet = new SoaDataSet(Count, kCacheEntrySize);

                if (Count > 0)
                {
                    bytes = new byte[Count][];
                    var cacheBytes = new byte[1][];
                    for (uint i = 0; i < Count; ++i)
                    {
                        ss.bytes.GetEntries(i, 1, ref cacheBytes);
                        bytes[i] = cacheBytes[0];
                    }
                    startAddress = new ulong[Count];
                    ss.startAddress.GetEntries(0, Count, ref startAddress);
                }
            }
Exemplo n.º 2
0
            public ManagedMemorySectionEntriesCache(ManagedMemorySectionEntries ss)
            {
                Count   = ss.GetNumEntries();
                dataSet = new SoaDataSet(Count, kCacheEntrySize);

                if (Count > 0)
                {
                    bytes = new byte[Count][];
                    var cacheBytes = new byte[1][];
                    for (uint i = 0; i < Count; ++i)
                    {
                        ss.bytes.GetEntries(i, 1, ref cacheBytes);
                        bytes[i] = cacheBytes[0];
                    }
                    startAddress = new ulong[Count];
                    //workaround using GetNumEntries instead of count due to limitations of internal API
                    ss.startAddress.GetEntries(0, ss.GetNumEntries(), ref startAddress);
                }
            }
Exemplo n.º 3
0
            public ManagedMemorySectionEntriesCache(ManagedMemorySectionEntries sectionEntries)
            {
                Count = sectionEntries.GetNumEntries();
                if (Count > 0)
                {
                    startAddress = new ulong[Count];
                    //workaround using GetNumEntries instead of count due to limitations of internal API
                    sectionEntries.startAddress.GetEntries(0, sectionEntries.GetNumEntries(), ref startAddress);
                    bytes = new byte[Count][];
                    var cacheBytes = new byte[1][];
                    for (uint i = 0; i < Count; ++i)
                    {
                        sectionEntries.bytes.GetEntries(i, 1, ref cacheBytes);
                        bytes[i] = cacheBytes[0];
                    }

                    SortSectionEntries(ref startAddress, ref bytes);

                    minAddress = startAddress[0];
                    maxAddress = startAddress[Count - 1] + (ulong)bytes[Count - 1].LongLength;
                }
            }