lean2/src/util/memory.h
Leonardo de Moura f24d9e84fe feat(frontends/lean): add option 'max_memory'
Default value is 512Mb
2015-03-06 13:56:20 -08:00

20 lines
568 B
C++

/*
Copyright (c) 2013 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include <cstdlib>
namespace lean {
/** \brief Set maximum amount of memory in bytes */
void set_max_memory(size_t max);
/** \brief Set maximum amount of memory in megabytes */
void set_max_memory_megabyte(unsigned max);
void check_memory(char const * component_name);
size_t get_allocated_memory();
void * malloc(size_t sz);
void * realloc(void * ptr, size_t sz);
void free(void * ptr);
}