code: final MemorySegment getNextBuffer() {
  		// check if the list directly offers memory
  		int s = this.availableMemory.size();
  		if (s > 0) {
  			return this.availableMemory.remove(s-1);
  		}
  		
  		// check if there are write behind buffers that actually are to be used for the hash table
  		if (this.writeBehindBuffersAvailable > 0) {
  			// grab at least one, no matter what
  			MemorySegment toReturn;
  			try {
  				toReturn = this.writeBehindBuffers.take();
  			}
  			catch (InterruptedException iex) {
  				throw new RuntimeException("Hybrid Hash Join was interrupted while taking a buffer.");
  			}
  			this.writeBehindBuffersAvailable--;
  			
  			// grab as many more buffers as are available directly
  			MemorySegment currBuff = null;
  			while (this.writeBehindBuffersAvailable > 0 && (currBuff = this.writeBehindBuffers.poll()) != null) {
  				this.availableMemory.add(currBuff);
  				this.writeBehindBuffersAvailable--;
  			}
  			return toReturn;
  		} else {
  			// no memory available
  			return null;
  		}
  	}
docs: Gets the next buffer to be used with the hash-table, either for an in-memory partition, or for the
  table buckets. This method returns <tt>null</tt>, if no more buffer is available. Spilling a partition
  may free new buffers then.
  
  @return The next buffer to be used by the hash-table, or null, if no buffer remains.
  @throws IOException Thrown, if the thread is interrupted while grabbing the next buffer. The I/O
  exception replaces the <tt>InterruptedException</tt> to consolidate the exception
  signatures.