/** <inheritdoc /> */
        public override void Reallocate(int cap)
        {
            // Try doubling capacity to avoid excessive allocations.
            int doubledCap = PlatformMemoryUtils.GetCapacity(Pointer) << 1;

            if (doubledCap > cap)
            {
                cap = doubledCap;
            }

            PlatformMemoryPool.Reallocate(Pointer, cap);
        }
        /** <inheritdoc /> */
        public override void Reallocate(int cap)
        {
            // Try doubling capacity to avoid excessive allocations.
            int doubledCap = PlatformMemoryUtils.Capacity(MemPtr) << 1;

            if (doubledCap > cap)
            {
                cap = doubledCap;
            }

            _pool.Reallocate(MemPtr, cap);
        }