Ejemplo n.º 1
0
 static unmanagedPool()
 {
     pools = dictionary.CreateInt <unmanagedPool>();
     pools.Add(unmanagedStreamBase.DefaultLength, TinyBuffers    = new unmanagedPool(unmanagedStreamBase.DefaultLength));
     pools.Add(config.appSetting.StreamBufferSize, StreamBuffers = new unmanagedPool(config.appSetting.StreamBufferSize));
     if (fastCSharp.config.appSetting.IsCheckMemory)
     {
         checkMemory.Add(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 静态哈希集合
 /// </summary>
 /// <param name="values">哈希数据集合</param>
 public unsafe staticHashSet(valueType[] values)
 {
     if (values.length() != 0)
     {
         unmanagedPool pool = fastCSharp.unmanagedPool.GetDefaultPool(values.Length * sizeof(int));
         pointer.size  data = pool.Get(values.Length * sizeof(int));
         try
         {
             getValues(values, data.Int);
         }
         finally { pool.Push(ref data); }
     }
     else
     {
         indexs = defaultIndexs;
         array  = nullValue <valueType> .Array;
     }
 }