src/main/java/org/opensearch/knn/index/memory/NativeMemoryAllocation.java [157:184]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        @Override
        public void readLock() {
            readWriteLock.readLock().lock();
        }

        /**
         * The write lock will be obtained in the
         * {@link NativeMemoryCacheManager NativeMemoryManager's} onRemoval function when the Index Allocation is
         * evicted from the cache. This prevents memory from being deallocated when it is being actively searched.
         */
        @Override
        public void writeLock() {
            readWriteLock.writeLock().lock();
        }

        @Override
        public void readUnlock() {
            readWriteLock.readLock().unlock();
        }

        @Override
        public void writeUnlock() {
            readWriteLock.writeLock().unlock();
        }

        @Override
        public int getSizeInKB() {
            return size;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/org/opensearch/knn/index/memory/NativeMemoryAllocation.java [414:436]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        @Override
        public void readLock() {
            readWriteLock.readLock().lock();
        }

        @Override
        public void writeLock() {
            readWriteLock.writeLock().lock();
        }

        @Override
        public void readUnlock() {
            readWriteLock.readLock().unlock();
        }

        @Override
        public void writeUnlock() {
            readWriteLock.writeLock().unlock();
        }

        @Override
        public int getSizeInKB() {
            return size;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



