2 Commits

Author SHA1 Message Date
92fea7f56b Add missing includes
Some checks failed
Tests / Release [gcc] total: 704, passed: 704
Tests / Coverage total: 702, passed: 702
weaselab/conflict-set/pipeline/head There was a failure building this commit
2024-02-27 17:33:23 -08:00
717264b452 Remove show memory for skip list for now 2024-02-27 12:02:51 -08:00
2 changed files with 2 additions and 17 deletions

View File

@@ -1,11 +1,13 @@
#include <ConflictSet.h> #include <ConflictSet.h>
#include <chrono> #include <chrono>
#include <cstring>
#include <fcntl.h> #include <fcntl.h>
#include <fstream> #include <fstream>
#include <sys/mman.h> #include <sys/mman.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include <vector>
double now() { double now() {
return std::chrono::duration_cast<std::chrono::nanoseconds>( return std::chrono::duration_cast<std::chrono::nanoseconds>(

View File

@@ -658,23 +658,6 @@ ConflictSet::~ConflictSet() {
} }
} }
#if SHOW_MEMORY
__attribute__((visibility("default"))) void showMemory(const ConflictSet &cs) {
ConflictSet::Impl *impl;
memcpy(&impl, &cs, sizeof(impl)); // NOLINT
fprintf(stderr, "Max Node1 memory usage: %" PRId64 "\n",
impl->allocators.node1.highWaterMarkBytes());
fprintf(stderr, "Max Node4 memory usage: %" PRId64 "\n",
impl->allocators.node4.highWaterMarkBytes());
fprintf(stderr, "Max Node16 memory usage: %" PRId64 "\n",
impl->allocators.node16.highWaterMarkBytes());
fprintf(stderr, "Max Node48 memory usage: %" PRId64 "\n",
impl->allocators.node48.highWaterMarkBytes());
fprintf(stderr, "Max Node256 memory usage: %" PRId64 "\n",
impl->allocators.node256.highWaterMarkBytes());
}
#endif
ConflictSet::ConflictSet(ConflictSet &&other) noexcept ConflictSet::ConflictSet(ConflictSet &&other) noexcept
: impl(std::exchange(other.impl, nullptr)) {} : impl(std::exchange(other.impl, nullptr)) {}