@Override
  public void removeMemoryUsageListener(final MemoryUsageListener listener) {
    synchronized (memoryUsageListeners) {
      int listenerIndex = -1;
      for (int i = 0; i < memoryUsageListeners.length; i++) {
        if (memoryUsageListeners[i] == listener) {
          listenerIndex = i;
          break;
        }
      }

      if (listenerIndex != -1) {
        final MemoryUsageListener[] newMemoryUsageListeners =
            new MemoryUsageListener[memoryUsageListeners.length - 1];
        System.arraycopy(memoryUsageListeners, 0, newMemoryUsageListeners, 0, listenerIndex);
        System.arraycopy(memoryUsageListeners, listenerIndex + 1, newMemoryUsageListeners,
            listenerIndex, memoryUsageListeners.length - listenerIndex - 1);
        memoryUsageListeners = newMemoryUsageListeners;
      }
    }
  }
Return the slabId of the slab that contains the given addr.
geode-core/src/main/java/org/apache/geode/internal/offheap/MemoryAllocatorImpl.java