public SerializedAlignmentContainer(UInt64 sizeInBytes)
            {
                // Reduce the size to 50% to ensure we don't exceed limits.
                // Need to save some memory for _bamAlignmentList as well.
                // Also, tests (on linux with mono) show that 3-4 GB of data is
                // briefly used after sorting, presumably while writing the
                // data. It's not clear to me what is using this memory, but
                // until I track that down, a 50% limit should work, albeit not
                // as efficiently as possible.
                _serializedAlignments = new BigByteArray(5 * (sizeInBytes / 10));

                _bamAlignmentList = new List <SerializedBamAlignment>();
                _offset           = 0;
            }
Example #2
0
        static void Main(string[] args)
        {
            long size = 0x1FFFFFFFF;
            //long size = UInt32.MaxValue;
            //long size = int.MaxValue;
            //byte[] countryCodes = new byte[size];

            BigByteArray baInt = new BigByteArray(size);
            long         len   = baInt.Length;

            for (long i = 0; i < len; i++)
            {
                baInt[i]      = 255;
                Console.Title = i.ToString();
            }

            Console.WriteLine("baInt[len/2] = " + baInt[len / 2]);


            Console.ReadKey();
        }