Commit 4d5969b2 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm][cleanup] Make {owned_code_space_} a vector

It was a std::list for no obvious reason. This CL turns it into a
vector, which is the standard data structure we use if we don't have
any special requirements.

R=mstarzinger@chromium.org

Change-Id: Iefc321db9327e0743772dd804e2325266a9bff64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1594727Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61235}
parent 9b30bdb4
......@@ -419,6 +419,7 @@ NativeModule::NativeModule(WasmEngine* engine, const WasmFeatures& enabled,
compilation_state_ =
CompilationState::New(*shared_this, std::move(async_counters));
DCHECK_NOT_NULL(module_);
owned_code_space_.reserve(can_request_more ? 4 : 1);
owned_code_space_.emplace_back(std::move(code_space));
#if defined(V8_OS_WIN_X64)
......
......@@ -525,7 +525,7 @@ class V8_EXPORT_PRIVATE NativeModule final {
DisjointAllocationPool free_code_space_;
DisjointAllocationPool allocated_code_space_;
std::list<VirtualMemory> owned_code_space_;
std::vector<VirtualMemory> owned_code_space_;
// End of fields protected by {allocation_mutex_}.
//////////////////////////////////////////////////////////////////////////////
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment