]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Fix use of make_unique in Arena::AllocateNewBlock (#11012)
authorPeter Dillinger <peterd@fb.com>
Thu, 1 Dec 2022 21:18:40 +0000 (13:18 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 1 Dec 2022 21:18:40 +0000 (13:18 -0800)
commit95bf3021899edef53aa6aba6d3c7172eded3560e
treee6e4fa1d154bca10987f1d8a850ac696a5ac40a0
parentbe3a62a2e7f70b573c8d977a90650bb217c62aa8
Fix use of make_unique in Arena::AllocateNewBlock (#11012)

Summary:
The change to `make_unique<char[]>` in https://github.com/facebook/rocksdb/issues/10810 inadvertently started initializing data in Arena blocks, which could lead to increased memory use due to (at least on our implementation) force-mapping pages as a result. This change goes back to `new char[]` while keeping all the other good parts of https://github.com/facebook/rocksdb/issues/10810.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/11012

Test Plan: unit test added (fails on Linux before fix)

Reviewed By: anand1976

Differential Revision: D41658893

Pulled By: pdillinger

fbshipit-source-id: 267b7dccfadaeeb1be767d43c602a6abb0e71cd0
memory/arena.cc
memory/arena_test.cc