lean4-htt/src/runtime/alloc.h
Sebastian Ullrich 044e3b1b56
fix: heartbeats from realizeConst should be ignored (#7473)
Avoids nondeterministic counting from racing threads
2025-03-13 15:10:29 +00:00

21 lines
558 B
C++

/*
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include <stddef.h>
#include <stdint.h>
#include <lean/lean.h>
namespace lean {
void init_thread_heap();
LEAN_EXPORT void * alloc(size_t sz);
LEAN_EXPORT void dealloc(void * o, size_t sz);
LEAN_EXPORT void set_heartbeats(uint64_t count);
LEAN_EXPORT void add_heartbeats(uint64_t count);
LEAN_EXPORT uint64_t get_num_heartbeats();
void initialize_alloc();
void finalize_alloc();
}