Example #1
0
        private KoiHeap CreateHeap()
        {
            if (settings.ExportDbgInfo)
            {
                dbgWriter = new DbgWriter();
            }

            var heap = new KoiHeap();

            foreach (var chunk in finalChunks)
            {
                heap.AddChunk(chunk.GetData());
            }
            if (dbgWriter != null)
            {
                using (var serializer = dbgWriter.GetSerializer())
                {
                    foreach (var chunk in finalChunks)
                    {
                        serializer.WriteBlock(chunk as BasicBlockChunk);
                    }
                }
            }
            return(heap);
        }
Example #2
0
        private KoiHeap CreateHeap()
        {
            if (this.settings.ExportDbgInfo)
            {
                this.dbgWriter = new DbgWriter();
            }

            var heap = new KoiHeap();

            foreach (IKoiChunk chunk in this.finalChunks)
            {
                heap.AddChunk(chunk.GetData());
            }
            if (this.dbgWriter != null)
            {
                using (DbgWriter.DbgSerializer serializer = this.dbgWriter.GetSerializer())
                {
                    foreach (IKoiChunk chunk in this.finalChunks)
                    {
                        serializer.WriteBlock(chunk as BasicBlockChunk);
                    }
                }
            }
            return(heap);
        }