Skip to content

Add some default initialisers. #207

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
May 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions src/mem/alloc.h
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@
#include "sizeclasstable.h"
#include "slab.h"

#include <array>
#include <functional>

namespace snmalloc
@@ -513,14 +514,9 @@ namespace snmalloc
* A stub Remote object that will always be the head of this list;
* never taken for further processing.
*/
Remote head;
Remote head{};

Remote* last;

RemoteList()
{
clear();
}
Remote* last{&head};

void clear()
{
@@ -543,8 +539,8 @@ namespace snmalloc
* need to dispatch everything, we can check if we are a real allocator
* and lazily provide a real allocator.
*/
int64_t capacity = 0;
RemoteList list[REMOTE_SLOTS];
int64_t capacity{0};
std::array<RemoteList, REMOTE_SLOTS> list{};

/// Used to find the index into the array of queues for remote
/// deallocation