public byte Batch; // Current insert batch public RowSet(Context ctx, int n) { Chunk = null; Ctx = ctx; Entry = null; Last = null; Fresh = new RowSetEntry[n]; FreshLength = n; Forest = null; Flags = ROWSET.SORTED; Batch = 0; }
static RowSetEntry RowSetEntryAlloc(RowSet p) { Debug.Assert(p != null); if (p.FreshLength == 0) { RowSetChunk newChunk = new RowSetChunk(); if (newChunk == null) { return(null); } newChunk.NextChunk = p.Chunk; p.Chunk = newChunk; p.Fresh = newChunk.Entrys; p.FreshLength = ROWSET_ENTRY_PER_CHUNK; } p.FreshLength--; return(p.Fresh[p.Fresh.Length - p.FreshLength] = new RowSetEntry()); }