llvm/compiler-rt/lib/scudo/standalone/quarantine.h

//===-- quarantine.h --------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef SCUDO_QUARANTINE_H_
#define SCUDO_QUARANTINE_H_

#include "list.h"
#include "mutex.h"
#include "string_utils.h"
#include "thread_annotations.h"

namespace scudo {

struct QuarantineBatch {};

static_assert; // 8Kb.

// Per-thread cache of memory blocks.
template <typename Callback> class QuarantineCache {};

// The callback interface is:
// void Callback::recycle(Node *Ptr);
// void *Callback::allocate(uptr Size);
// void Callback::deallocate(void *Ptr);
template <typename Callback, typename Node> class GlobalQuarantine {};

} // namespace scudo

#endif // SCUDO_QUARANTINE_H_