//add objects to region public void Initialize(List <ObjectWrapper> Arr) { while (size < regionSizeMB * 1024 * 1024) { //create an object with the characteristics(size, pinned) of this region. The object is added either o the static array or to Arr bool useStatic = Rand.Next(0, 2) == 0 ? true : false; if (useStatic) { staticArr.Add(ObjectWrapper.AddObject(this, 0, null)); } else { Arr.Add(ObjectWrapper.AddObject(this, 0, null)); } } UpdateAvg(); }