Ejemplo n.º 1
0
 public _IEnumerator_121(CircularBuffer4 _enclosing, int head, int tail)
 {
     this._enclosing = _enclosing;
     this.head       = head;
     this.tail       = tail;
     this._index     = head;
     this._current   = Iterators.NoElement;
 }
Ejemplo n.º 2
0
		internal LRU2QCache(int maxSize)
		{
			_maxSize = maxSize;
			_a1_threshold = _maxSize / 4;
			_am = new CircularBuffer4(_maxSize);
			_a1 = new CircularBuffer4(_maxSize);
			_slots = new Hashtable(maxSize);
		}
Ejemplo n.º 3
0
		public LRU2QXCache(int maxSize)
		{
			// 'eden': long-term lru queue
			// 'nursery': short-term fifo queue, entry point for all new items
			// 'backlog': fifo queue, elements may not be backed in _slots or may overlap with _am
			// invariant: |_slots| = |_am| + |_a1in| <= _maxSize
			_maxSize = maxSize;
			_inSize = _maxSize / 4;
			_slots = new Hashtable(_maxSize);
			_am = new CircularBuffer4(_maxSize);
			_a1in = new CircularBuffer4(_maxSize);
			_a1out = new CircularBuffer4(_maxSize / 2);
		}
Ejemplo n.º 4
0
		internal LRUCache(int size)
		{
			_maxSize = size;
			_slots = new Hashtable(size);
			_lru = new CircularBuffer4(size);
		}
Ejemplo n.º 5
0
			public _IEnumerator_121(CircularBuffer4 _enclosing, int head, int tail)
			{
				this._enclosing = _enclosing;
				this.head = head;
				this.tail = tail;
				this._index = head;
				this._current = Iterators.NoElement;
			}
Ejemplo n.º 6
0
		private void DiscardPageFrom(CircularBuffer4 list, IProcedure4 finalizer)
		{
			Discard(list.RemoveLast(), finalizer);
		}