docs: public 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.buildSpillRetBufferNumbers > 0) {
  			// grab at least one, no matter what
  			MemorySegment toReturn;
  			try {
  				toReturn = this.buildSpillReturnBuffers.take();
  			} catch (InterruptedException iex) {
  				throw new RuntimeException("Hybrid Hash Join was interrupted while taking a buffer.");
  			}
  			this.buildSpillRetBufferNumbers--;
  
  			// grab as many more buffers as are available directly
  			MemorySegment currBuff;
  			while (this.buildSpillRetBufferNumbers > 0 && (currBuff = this.buildSpillReturnBuffers.poll()) != null) {
  				this.availableMemory.add(currBuff);
  				this.buildSpillRetBufferNumbers--;
  			}
  			return toReturn;
  		} else {
  			if (reservedNumBuffers + allocatedFloatingNum >= maxNumBuffers) {
  				//no more memory.
  				return null;
  			} else {
  				int requestNum = Math.min(perRequestNumBuffers, maxNumBuffers - reservedNumBuffers -
  						allocatedFloatingNum);
  				//apply for much more memory.
  				try {
  					List<MemorySegment> allocates = memManager.allocatePages(owner, requestNum);
  					this.availableMemory.addAll(allocates);
  					allocatedFloatingNum += allocates.size();
  					allocates.clear();
  					LOG.info("{} allocate {} floating segments successfully!", owner, requestNum);
  				} catch (MemoryAllocationException e) {
  					LOG.warn("BinaryHashMap can't allocate {} floating pages, and now used {} pages",
  							requestNum, reservedNumBuffers + allocatedFloatingNum, e);
  					//can't allocate much more memory.
  					return null;
  				}
  				if (this.availableMemory.size() > 0) {
  					return this.availableMemory.remove(this.availableMemory.size() - 1);
  				} else {
  					return null;
  				}
  			}
  		}
  	}