Metall
v0.29
A persistent memory allocator for data-centric analytics
metall.h
Go to the documentation of this file.
1
// Copyright 2024 Lawrence Livermore National Security, LLC and other Metall
2
// Project Developers. See the top-level COPYRIGHT file for details.
3
//
4
// SPDX-License-Identifier: (Apache-2.0 OR MIT)
5
6
#ifndef METALL_C_API_METALL_H
7
#define METALL_C_API_METALL_H
8
9
#include <stdbool.h>
10
#include <stddef.h>
11
12
#ifdef __cplusplus
13
extern
"C"
{
14
#endif
15
21
typedef
struct
metall_manager
metall_manager
;
22
29
metall_manager
*
metall_open
(
const
char
* path);
30
37
metall_manager
*
metall_open_read_only
(
const
char
* path);
38
46
metall_manager
*
metall_create
(
const
char
* path);
47
54
bool
metall_snapshot
(
metall_manager
*
manager
,
const
char
* dst_path);
55
60
void
metall_flush
(
metall_manager
*
manager
);
61
65
void
metall_close
(
metall_manager
*
manager
);
66
75
bool
metall_remove
(
const
char
* path);
76
84
void
*
metall_malloc
(
metall_manager
*
manager
,
size_t
size);
85
91
void
metall_free
(
metall_manager
*
manager
,
void
* ptr);
92
102
void
*
metall_named_malloc
(
metall_manager
*
manager
,
const
char
* name,
103
size_t
size);
104
113
void
*
metall_find
(
metall_manager
*
manager
,
const
char
* name);
114
123
bool
metall_named_free
(
metall_manager
*
manager
,
const
char
* name);
124
125
#ifdef __cplusplus
126
}
127
#endif
128
131
132
#endif
// METALL_C_API_METALL_H
metall_close
void metall_close(metall_manager *manager)
Closes a metall manager.
metall_snapshot
bool metall_snapshot(metall_manager *manager, const char *dst_path)
Creates a snapshot of the metall datastore of manager and places it at dst_path.
metall_manager
struct metall_manager metall_manager
Opaque struct representing a metall manager.
Definition:
metall.h:21
metall_named_malloc
void * metall_named_malloc(metall_manager *manager, const char *name, size_t size)
Allocates size bytes and associates the allocated memory with a name.
metall_free
void metall_free(metall_manager *manager, void *ptr)
Frees memory previously allocated by metall_malloc.
metall_open_read_only
metall_manager * metall_open_read_only(const char *path)
Attempts to open the metall datastore at path in read only mode.
metall_remove
bool metall_remove(const char *path)
Removes the metall datastore at path.
metall_open
metall_manager * metall_open(const char *path)
Attempts to open the metall datastore at path.
metall_create
metall_manager * metall_create(const char *path)
Attempts to create a metall datastore at path.
metall_find
void * metall_find(metall_manager *manager, const char *name)
Finds memory that was previously allocated using metall_named_alloc.
metall_malloc
void * metall_malloc(metall_manager *manager, size_t size)
Allocates size bytes.
metall_named_free
bool metall_named_free(metall_manager *manager, const char *name)
Frees memory previously allocated by metall_named_malloc.
metall_flush
void metall_flush(metall_manager *manager)
Flushes the given manager.
metall::manager
basic_manager<> manager
Default Metall manager class which is an alias of basic_manager with the default template parameters.
Definition:
metall.hpp:34
include
metall
c_api
metall.h
Generated by
1.9.1