diff --git a/.github/workflows/MainDistributionPipeline.yml b/.github/workflows/MainDistributionPipeline.yml index 43eb3ff9..c77e16ec 100644 --- a/.github/workflows/MainDistributionPipeline.yml +++ b/.github/workflows/MainDistributionPipeline.yml @@ -22,16 +22,16 @@ concurrency: cancel-in-progress: true jobs: - duckdb-stable-build: + duckdb-latest-build: name: Build extension binaries - uses: ./.github/workflows/_extension_distribution.yml + uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@main with: duckdb_version: main extension_name: spatial - duckdb-stable-deploy: + duckdb-latest-deploy: name: Deploy extension binaries - needs: duckdb-stable-build + needs: duckdb-latest-build uses: duckdb/extension-ci-tools/.github/workflows/_extension_deploy.yml@main secrets: inherit with: diff --git a/.github/workflows/StableDistributionPipeline.yml b/.github/workflows/StableDistributionPipeline.yml index 8da3a745..a6908a70 100644 --- a/.github/workflows/StableDistributionPipeline.yml +++ b/.github/workflows/StableDistributionPipeline.yml @@ -5,13 +5,13 @@ name: Stable Extension Distribution Pipeline on: pull_request: branches: - - v1.0.0 + - v1.1.0 paths-ignore: - '**/README.md' - 'doc/**' push: branches: - - v1.0.0 + - v1.1.0 paths-ignore: - '**/README.md' - 'doc/**' @@ -24,17 +24,17 @@ concurrency: jobs: duckdb-stable-build: name: Build extension binaries - uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@v1.0.0 + uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@v1.1.0 with: - duckdb_version: v1.0.0 + duckdb_version: v1.1.0 extension_name: spatial duckdb-stable-deploy: name: Deploy extension binaries needs: duckdb-stable-build - uses: duckdb/extension-ci-tools/.github/workflows/_extension_deploy.yml@v1.0.0 + uses: duckdb/extension-ci-tools/.github/workflows/_extension_deploy.yml@v1.1.0 secrets: inherit with: - duckdb_version: v1.0.0 + duckdb_version: v1.1.0 extension_name: spatial - deploy_latest: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/v1.0.0' }} + deploy_latest: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/v1.1.0' }} diff --git a/.github/workflows/_extension_distribution.yml b/.github/workflows/_extension_distribution.yml deleted file mode 100644 index 8bbd392e..00000000 --- a/.github/workflows/_extension_distribution.yml +++ /dev/null @@ -1,571 +0,0 @@ -# Reusable workflow for building DuckDB extensions using a standardized environment -# -# The workflow: -# - builds the extension using the CI workflow from the corresponding DuckDB version -# - uploads the extensions as gh actions artifacts in the following format: -# --extension- -# -# note: extensions are simply uploaded to GitHub actions, deploying the extensions is done a separate step. More info on -# this can be found in https://github.com/duckdb/extension-template - -name: Extension distribution -on: - workflow_call: - inputs: - # The name with which the extension will be built - extension_name: - required: true - type: string - # DuckDB version to build against, should in most cases be identical to - duckdb_version: - required: true - type: string - # ';' separated list of architectures to exclude, for example: 'linux_amd64;osx_arm64' - exclude_archs: - required: false - type: string - default: "" - # Postfix added to artifact names. Can be used to guarantee unique names when this workflow is called multiple times - artifact_postfix: - required: false - type: string - default: "" - # Override the default vcpkg commit used by this version of DuckDB - vcpkg_commit: - required: false - type: string - default: "a1a1cbc975abf909a6c8985a6a2b8fe20bbd9bd6" - # Override the default script producing the matrices. Allows specifying custom matrices. - matrix_parse_script: - required: false - type: string - default: "./duckdb/scripts/modify_distribution_matrix.py" - # Enable building the DuckDB Shell - build_duckdb_shell: - required: false - type: boolean - default: true - # Supply an override repository to build, instead of using the current one - override_repository: - required: false - type: string - default: "" - # The git ref used for the override_repository - override_ref: - required: false - type: string - default: "" - # Override the repo for the CI tools (for testing CI tools itself) - override_ci_tools_repository: - required: false - type: string - default: "" - # Override the ref for the CI tools (for testing CI tools itself) - override_ci_tools_ref: - required: false - type: string - default: "" - # Pass extra toolchains - # available: (rust) - extra_toolchains: - required: false - type: string - default: "" - # DEPRECATED: use extra_toolchains instead - enable_rust: - required: false - type: boolean - default: false -jobs: - generate_matrix: - name: Generate matrix - runs-on: ubuntu-latest - outputs: - linux_matrix: ${{ steps.set-matrix-linux.outputs.linux_matrix }} - windows_matrix: ${{ steps.set-matrix-windows.outputs.windows_matrix }} - osx_matrix: ${{ steps.set-matrix-osx.outputs.osx_matrix }} - wasm_matrix: ${{ steps.set-matrix-wasm.outputs.wasm_matrix }} - steps: - - uses: actions/checkout@v3 - name: Checkout override repository - if: ${{inputs.override_repository != ''}} - with: - repository: ${{ inputs.override_repository }} - ref: ${{ inputs.override_ref }} - fetch-depth: 0 - submodules: 'true' - - - uses: actions/checkout@v3 - name: Checkout current repository - if: ${{inputs.override_repository == ''}} - with: - fetch-depth: 0 - submodules: 'true' - - - name: Checkout DuckDB to version - run: | - cd duckdb - git checkout ${{ inputs.duckdb_version }} - - - id: parse-matrices - run: | - python3 ${{ inputs.matrix_parse_script }} --input ./duckdb/.github/config/distribution_matrix.json --select_os linux --output linux_matrix.json --exclude "${{ inputs.exclude_archs }}" --pretty - python3 ${{ inputs.matrix_parse_script }} --input ./duckdb/.github/config/distribution_matrix.json --select_os osx --output osx_matrix.json --exclude "${{ inputs.exclude_archs }}" --pretty - python3 ${{ inputs.matrix_parse_script }} --input ./duckdb/.github/config/distribution_matrix.json --select_os windows --output windows_matrix.json --exclude "${{ inputs.exclude_archs }}" --pretty - python3 ${{ inputs.matrix_parse_script }} --input ./duckdb/.github/config/distribution_matrix.json --select_os wasm --output wasm_matrix.json --exclude "${{ inputs.exclude_archs }}" --pretty - - - id: set-matrix-linux - run: | - linux_matrix="`cat linux_matrix.json`" - echo linux_matrix=$linux_matrix >> $GITHUB_OUTPUT - echo `cat $GITHUB_OUTPUT` - - - id: set-matrix-osx - run: | - osx_matrix="`cat osx_matrix.json`" - echo osx_matrix=$osx_matrix >> $GITHUB_OUTPUT - echo `cat $GITHUB_OUTPUT` - - - id: set-matrix-windows - run: | - windows_matrix="`cat windows_matrix.json`" - echo windows_matrix=$windows_matrix >> $GITHUB_OUTPUT - echo `cat $GITHUB_OUTPUT` - - - id: set-matrix-wasm - run: | - wasm_matrix="`cat wasm_matrix.json`" - echo wasm_matrix=$wasm_matrix >> $GITHUB_OUTPUT - echo `cat $GITHUB_OUTPUT` - - linux: - name: Linux - runs-on: ubuntu-latest - container: ${{ matrix.container }} - needs: generate_matrix - if: ${{ needs.generate_matrix.outputs.linux_matrix != '{}' && needs.generate_matrix.outputs.linux_matrix != '' }} - strategy: - matrix: ${{fromJson(needs.generate_matrix.outputs.linux_matrix)}} - env: - VCPKG_TARGET_TRIPLET: ${{ matrix.vcpkg_triplet }} - VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake - GEN: ninja - BUILD_SHELL: ${{ inputs.build_duckdb_shell && '1' || '0' }} - DUCKDB_PLATFORM: ${{ matrix.duckdb_arch }} - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true - - steps: - ### - # Setup environment (TODO: this should ideally be part of a container image) - ### - - name: Install required ubuntu packages - if: ${{ matrix.duckdb_arch == 'linux_amd64' || matrix.duckdb_arch == 'linux_arm64' }} - run: | - apt-get update -y -qq - apt-get install -y -qq software-properties-common - apt-get install -y -qq --fix-missing ninja-build make gcc-multilib g++-multilib libssl-dev wget openjdk-8-jdk zip maven unixodbc-dev libc6-dev-i386 lib32readline6-dev libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip build-essential checkinstall libffi-dev curl libz-dev openssh-client pkg-config - - - name: Install required manylinux packages - if: ${{ matrix.duckdb_arch == 'linux_amd64_gcc4' }} - run: | - yum install -y epel-release -y pkgconfig - - - name: Install cross compiler for linux_arm64 - shell: bash - if: ${{ matrix.duckdb_arch == 'linux_arm64' }} - run: | - apt-get install -y -qq gcc-aarch64-linux-gnu g++-aarch64-linux-gnu - - - name: Install Git 2.18.5 - if: ${{ matrix.duckdb_arch == 'linux_amd64' || matrix.duckdb_arch == 'linux_arm64' }} - run: | - wget https://github.com/git/git/archive/refs/tags/v2.18.5.tar.gz - tar xvf v2.18.5.tar.gz - cd git-2.18.5 - make - make prefix=/usr install - git --version - - - name: Setup Rust - if: ${{ (inputs.enable_rust || contains(format(';{0};', inputs.extra_toolchains), ';rust;')) && matrix.duckdb_arch == 'linux_amd64'}} - uses: dtolnay/rust-toolchain@stable - - - name: Setup Rust for cross compilation - if: ${{ (inputs.enable_rust || contains(format(';{0};', inputs.extra_toolchains), ';rust;')) && matrix.duckdb_arch == 'linux_arm64'}} - uses: dtolnay/rust-toolchain@stable - with: - targets: aarch64-unknown-linux-gnu - - - name: Setup Rust for manylinux (dtolnay/rust-toolchain doesn't work due to curl being old here) - if: ${{ (inputs.enable_rust || contains(format(';{0};', inputs.extra_toolchains), ';rust;')) && matrix.duckdb_arch == 'linux_amd64_gcc4' }} - run: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - - name: Install CMake 3.21 - if: ${{ matrix.duckdb_arch == 'linux_amd64' || matrix.duckdb_arch == 'linux_arm64' }} - shell: bash - run: | - wget https://github.com/Kitware/CMake/releases/download/v3.21.3/cmake-3.21.3-linux-x86_64.sh - chmod +x cmake-3.21.3-linux-x86_64.sh - ./cmake-3.21.3-linux-x86_64.sh --skip-license --prefix=/usr/local - cmake --version - - - name: Install parser tools - if: ${{ contains(format(';{0};', inputs.extra_toolchains), ';parser_tools;') && (matrix.duckdb_arch == 'linux_amd64' || matrix.duckdb_arch == 'linux_arm64') }} - run: | - apt-get install -y -qq bison flex - - - name: Install parser tools (manylinux) - if: ${{ contains(format(';{0};', inputs.extra_toolchains), ';parser_tools;') && matrix.duckdb_arch == 'linux_amd64_gcc4'}} - run: | - yum install -y bison flex - - ### - # Checkin out repositories - ### - - uses: actions/checkout@v3 - name: Checkout override repository - if: ${{inputs.override_repository != ''}} - with: - repository: ${{ inputs.override_repository }} - ref: ${{ inputs.override_ref }} - fetch-depth: 0 - submodules: 'true' - - - uses: actions/checkout@v3 - name: Checkout current repository - if: ${{inputs.override_repository == ''}} - with: - fetch-depth: 0 - submodules: 'true' - - - name: Checkout DuckDB to version - run: | - cd duckdb - git checkout ${{ inputs.duckdb_version }} - - - name: Setup ManyLinux2014 - if: ${{ matrix.duckdb_arch == 'linux_amd64_gcc4' }} - run: | - ./duckdb/scripts/setup_manylinux2014.sh general ccache ssh python_alias openssl - - - uses: actions/checkout@v3 - name: Checkout Extension CI tools - if: ${{inputs.override_ci_tools_ref != ''}} - with: - path: 'extension-ci-tools' - ref: ${{ inputs.override_ci_tools_ref }} - repository: ${{ inputs.override_ci_tools_repository }} - fetch-depth: 0 - - ### - # Runtime configuration before build - ### - - name: Setup Ccache - uses: hendrikmuhs/ccache-action@v1.2.11 # Note: pinned due to GLIBC incompatibility in later releases - continue-on-error: true - with: - key: ${{ github.job }}-${{ matrix.duckdb_arch }} - - - name: Setup vcpkg - uses: lukka/run-vcpkg@v11.1 - with: - vcpkgGitCommitId: ${{ inputs.vcpkg_commit }} - - - name: Configure OpenSSL for Rust - if: ${{ (inputs.enable_rust || contains(format(';{0};', inputs.extra_toolchains), ';rust;')) }} - run: | - echo "OPENSSL_ROOT_DIR=`pwd`/build/release/vcpkg_installed/${{ matrix.vcpkg_triplet }}" >> $GITHUB_ENV - echo "OPENSSL_DIR=`pwd`/build/release/vcpkg_installed/${{ matrix.vcpkg_triplet }}" >> $GITHUB_ENV - echo "OPENSSL_USE_STATIC_LIBS=true" >> $GITHUB_ENV - - ### - # Building & testing - ### - - name: Build extension - env: - GEN: ninja - CC: ${{ matrix.duckdb_arch == 'linux_arm64' && 'aarch64-linux-gnu-gcc' || '' }} - CXX: ${{ matrix.duckdb_arch == 'linux_arm64' && 'aarch64-linux-gnu-g++' || '' }} - DUCKDB_PLATFORM: ${{ matrix.duckdb_arch }} - run: | - make release - - - name: Test extension - if: ${{ matrix.duckdb_arch != 'linux_arm64'}} - run: | - make test - - - uses: actions/upload-artifact@v2 - with: - name: ${{ inputs.extension_name }}-${{ inputs.duckdb_version }}-extension-${{matrix.duckdb_arch}}${{inputs.artifact_postfix}} - path: | - build/release/extension/${{ inputs.extension_name }}/${{ inputs.extension_name }}.duckdb_extension - - macos: - name: MacOS - runs-on: macos-latest - needs: generate_matrix - if: ${{ needs.generate_matrix.outputs.osx_matrix != '{}' && needs.generate_matrix.outputs.osx_matrix != '' }} - strategy: - matrix: ${{fromJson(needs.generate_matrix.outputs.osx_matrix)}} - env: - VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake - VCPKG_TARGET_TRIPLET: ${{ matrix.vcpkg_triplet }} - OSX_BUILD_ARCH: ${{ matrix.osx_build_arch }} - GEN: ninja - BUILD_SHELL: ${{ inputs.build_duckdb_shell && '1' || '0' }} - DUCKDB_PLATFORM: ${{ matrix.duckdb_arch }} - - steps: - - uses: actions/checkout@v3 - name: Checkout override repository - if: ${{inputs.override_repository != ''}} - with: - repository: ${{ inputs.override_repository }} - ref: ${{ inputs.override_ref }} - fetch-depth: 0 - submodules: 'true' - - - uses: actions/checkout@v3 - name: Checkout current repository - if: ${{inputs.override_repository == ''}} - with: - fetch-depth: 0 - submodules: 'true' - - - name: Install Ninja - run: | - brew install ninja - - - name: Setup Ccache - uses: hendrikmuhs/ccache-action@main - continue-on-error: true - with: - key: ${{ github.job }}-${{ matrix.duckdb_arch }} - - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - uses: actions/checkout@v3 - name: Checkout Extension CI tools - if: ${{inputs.override_ci_tools_ref != ''}} - with: - path: 'extension-ci-tools' - ref: ${{ inputs.override_ci_tools_ref }} - repository: ${{ inputs.override_ci_tools_repository }} - fetch-depth: 0 - - - name: Checkout DuckDB to version - run: | - cd duckdb - git checkout ${{ inputs.duckdb_version }} - - - name: Setup vcpkg - uses: lukka/run-vcpkg@v11.1 - with: - vcpkgGitCommitId: ${{ inputs.vcpkg_commit }} - - - name: Install Rust cross compile dependency - if: ${{ (inputs.enable_rust || contains(format(';{0};', inputs.extra_toolchains), ';rust;')) && matrix.osx_build_arch == 'x86_64'}} - run: | - rustup target add x86_64-apple-darwin - - - name: Install parser tools - if: ${{ contains(format(';{0};', inputs.extra_toolchains), ';parser_tools;')}} - run: | - brew install bison flex - - - name: Build extension - shell: bash - env: - DUCKDB_PLATFORM: ${{ matrix.duckdb_arch }} - run: | - make release - - - name: Test Extension - if: ${{ matrix.osx_build_arch == 'x86_64'}} - shell: bash - run: | - make test - - - uses: actions/upload-artifact@v3 - with: - if-no-files-found: error - name: ${{ inputs.extension_name }}-${{ inputs.duckdb_version }}-extension-${{matrix.duckdb_arch}}${{inputs.artifact_postfix}} - path: | - build/release/extension/${{ inputs.extension_name }}/${{ inputs.extension_name }}.duckdb_extension - - windows: - name: Windows - runs-on: windows-latest - needs: generate_matrix - if: ${{ needs.generate_matrix.outputs.windows_matrix != '{}' && needs.generate_matrix.outputs.windows_matrix != '' }} - strategy: - matrix: ${{fromJson(needs.generate_matrix.outputs.windows_matrix)}} - env: - VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake - VCPKG_TARGET_TRIPLET: ${{ matrix.vcpkg_triplet }} - BUILD_SHELL: ${{ inputs.build_duckdb_shell && '1' || '0' }} - DUCKDB_PLATFORM: ${{ matrix.duckdb_arch }} - CC: ${{ matrix.duckdb_arch == 'windows_amd64_rtools' && 'gcc' || '' }} - CXX: ${{ matrix.duckdb_arch == 'windows_amd64_rtools' && 'g++' || '' }} - - steps: - - name: Keep \n line endings - shell: bash - run: | - git config --global core.autocrlf false - git config --global core.eol lf - - - uses: actions/checkout@v3 - name: Checkout override repository - if: ${{inputs.override_repository != ''}} - with: - repository: ${{ inputs.override_repository }} - ref: ${{ inputs.override_ref }} - fetch-depth: 0 - submodules: 'true' - - - uses: actions/checkout@v3 - name: Checkout current repository - if: ${{inputs.override_repository == ''}} - with: - fetch-depth: 0 - submodules: 'true' - - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Setup Rust - if: (inputs.enable_rust || contains(format(';{0};', inputs.extra_toolchains), ';rust;')) - uses: dtolnay/rust-toolchain@stable - - - name: Install parser tools - if: ${{ contains(format(';{0};', inputs.extra_toolchains), ';parser_tools;')}} - run: | - choco install winflexbison3 - - - uses: r-lib/actions/setup-r@v2 - if: matrix.duckdb_arch == 'windows_amd64_rtools' - with: - r-version: 'devel' - update-rtools: true - rtools-version: '42' # linker bug in 43 - - - uses: actions/checkout@v3 - name: Checkout Extension CI tools - if: ${{inputs.override_ci_tools_ref != ''}} - with: - path: 'extension-ci-tools' - ref: ${{ inputs.override_ci_tools_ref }} - repository: ${{ inputs.override_ci_tools_repository }} - fetch-depth: 0 - - - name: Checkout DuckDB to version - run: | - cd duckdb - git checkout ${{ inputs.duckdb_version }} - - - name: Setup Ccache - uses: hendrikmuhs/ccache-action@main - continue-on-error: true - with: - key: ${{ github.job }}-${{ matrix.duckdb_arch }} - - - name: Setup vcpkg - uses: lukka/run-vcpkg@v11.1 - with: - vcpkgGitCommitId: ${{ inputs.vcpkg_commit }} - - - name: Build & test extension - env: - DUCKDB_PLATFORM: ${{ matrix.duckdb_arch }} - DUCKDB_PLATFORM_RTOOLS: ${{ matrix.duckdb_arch == 'windows_amd64_rtools' && 1 || 0 }} - run: | - make test_release - - - uses: actions/upload-artifact@v3 - with: - if-no-files-found: error - name: ${{ inputs.extension_name }}-${{ inputs.duckdb_version }}-extension-${{matrix.duckdb_arch}}${{inputs.artifact_postfix}} - path: | - build/release/extension/${{ inputs.extension_name }}/${{ inputs.extension_name }}.duckdb_extension - - wasm: - name: DuckDB-Wasm - runs-on: ubuntu-latest - needs: generate_matrix - if: ${{ needs.generate_matrix.outputs.wasm_matrix != '{}' && needs.generate_matrix.outputs.wasm_matrix != '' }} - strategy: - matrix: ${{fromJson(needs.generate_matrix.outputs.wasm_matrix)}} - env: - VCPKG_TARGET_TRIPLET: ${{ matrix.vcpkg_triplet }} - VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake - DUCKDB_PLATFORM: ${{ matrix.duckdb_arch }} - - steps: - - uses: actions/checkout@v3 - name: Checkout override repository - if: ${{inputs.override_repository != ''}} - with: - repository: ${{ inputs.override_repository }} - ref: ${{ inputs.override_ref }} - fetch-depth: 0 - submodules: 'true' - - - uses: actions/checkout@v3 - name: Checkout current repository - if: ${{inputs.override_repository == ''}} - with: - fetch-depth: 0 - submodules: 'true' - - - uses: actions/checkout@v3 - name: Checkout Extension CI tools - if: ${{inputs.override_ci_tools_ref != ''}} - with: - path: 'extension-ci-tools' - ref: ${{ inputs.override_ci_tools_ref }} - repository: ${{ inputs.override_ci_tools_repository }} - fetch-depth: 0 - - - name: Checkout DuckDB to version - run: | - cd duckdb - git checkout ${{ inputs.duckdb_version }} - - - uses: mymindstorm/setup-emsdk@v13 - with: - version: 'latest' - - - name: Setup Rust for cross compilation - if: ${{ (inputs.enable_rust || contains(format(';{0};', inputs.extra_toolchains), ';rust;'))}} - uses: dtolnay/rust-toolchain@stable - with: - targets: wasm32-unknown-emscripten - - - name: Setup vcpkg - uses: lukka/run-vcpkg@v11.1 - with: - vcpkgGitCommitId: ${{ inputs.vcpkg_commit }} - - - name: Setup Ccache - uses: hendrikmuhs/ccache-action@main - continue-on-error: true - with: - key: ${{ github.job }}-${{ matrix.duckdb_arch }} - - - name: Build Wasm module - run: | - make ${{ matrix.duckdb_arch }} - - - uses: actions/upload-artifact@v3 - with: - if-no-files-found: error - name: ${{ inputs.extension_name }}-${{ inputs.duckdb_version }}-extension-${{matrix.duckdb_arch}}${{inputs.artifact_postfix}} - path: | - build/${{ matrix.duckdb_arch }}/extension/${{ inputs.extension_name }}/${{ inputs.extension_name }}.duckdb_extension.wasm \ No newline at end of file diff --git a/spatial/include/spatial/core/util/managed_collection.hpp b/spatial/include/spatial/core/util/managed_collection.hpp index 3535affb..dbf21f12 100644 --- a/spatial/include/spatial/core/util/managed_collection.hpp +++ b/spatial/include/spatial/core/util/managed_collection.hpp @@ -95,7 +95,8 @@ void ManagedCollection::InitializeAppend(ManagedCollectionAppendState &state, state.block = &blocks.back(); state.block->item_count = 0; state.block->item_capacity = block_capacity; - state.handle = manager.Allocate(MemoryTag::EXTENSION, block_size, true, &state.block->handle); + state.handle = manager.Allocate(MemoryTag::EXTENSION, block_size, true); + state.block->handle = state.handle.GetBlockHandle(); } } @@ -108,7 +109,8 @@ void ManagedCollection::Append(ManagedCollectionAppendState &state, const T * state.block = &blocks.back(); state.block->item_count = 0; state.block->item_capacity = block_capacity; - state.handle = manager.Allocate(MemoryTag::EXTENSION, block_size, true, &state.block->handle); + state.handle = manager.Allocate(MemoryTag::EXTENSION, block_size, true); + state.block->handle = state.handle.GetBlockHandle(); } // Compute how much we can copy before the block is full or we run out of elements