Electroneum
Toggle main menu visibility
Loading...
Searching...
No Matches
secp256k1_preallocated.h
Go to the documentation of this file.
1
#ifndef SECP256K1_PREALLOCATED_H
2
#define SECP256K1_PREALLOCATED_H
3
4
#include "
secp256k1.h
"
5
6
#ifdef __cplusplus
7
extern
"C"
{
8
#endif
9
10
/* The module provided by this header file is intended for settings in which it
11
* is not possible or desirable to rely on dynamic memory allocation. It provides
12
* functions for creating, cloning, and destroying secp256k1 context objects in a
13
* contiguous fixed-size block of memory provided by the caller.
14
*
15
* Context objects created by functions in this module can be used like contexts
16
* objects created by functions in secp256k1.h, i.e., they can be passed to any
17
* API function that expects a context object (see secp256k1.h for details). The
18
* only exception is that context objects created by functions in this module
19
* must be destroyed using secp256k1_context_preallocated_destroy (in this
20
* module) instead of secp256k1_context_destroy (in secp256k1.h).
21
*
22
* It is guaranteed that functions in this module will not call malloc or its
23
* friends realloc, calloc, and free.
24
*/
25
35
SECP256K1_API
size_t
secp256k1_context_preallocated_size
(
36
unsigned
int
flags
37
)
SECP256K1_WARN_UNUSED_RESULT
;
38
66
SECP256K1_API
secp256k1_context
*
secp256k1_context_preallocated_create
(
67
void
* prealloc,
68
unsigned
int
flags
69
)
SECP256K1_ARG_NONNULL
(1)
SECP256K1_WARN_UNUSED_RESULT
;
70
77
SECP256K1_API
size_t
secp256k1_context_preallocated_clone_size
(
78
const
secp256k1_context
* ctx
79
)
SECP256K1_ARG_NONNULL
(1)
SECP256K1_WARN_UNUSED_RESULT
;
80
97
SECP256K1_API
secp256k1_context
*
secp256k1_context_preallocated_clone
(
98
const
secp256k1_context
* ctx,
99
void
* prealloc
100
)
SECP256K1_ARG_NONNULL
(1)
SECP256K1_ARG_NONNULL
(2)
SECP256K1_WARN_UNUSED_RESULT
;
101
122
SECP256K1_API
void
secp256k1_context_preallocated_destroy
(
123
secp256k1_context
* ctx
124
)
SECP256K1_ARG_NONNULL
(1);
125
126
#ifdef __cplusplus
127
}
128
#endif
129
130
#endif
/* SECP256K1_PREALLOCATED_H */
secp256k1.h
SECP256K1_ARG_NONNULL
#define SECP256K1_ARG_NONNULL(_x)
Definition
secp256k1.h:177
secp256k1_context
struct secp256k1_context_struct secp256k1_context
Definition
secp256k1.h:50
SECP256K1_API
#define SECP256K1_API
Definition
secp256k1.h:162
SECP256K1_WARN_UNUSED_RESULT
#define SECP256K1_WARN_UNUSED_RESULT
Definition
secp256k1.h:172
secp256k1_context_preallocated_clone_size
SECP256K1_API size_t secp256k1_context_preallocated_clone_size(const secp256k1_context *ctx) SECP256K1_ARG_NONNULL(1) SECP256K1_WARN_UNUSED_RESULT
secp256k1_context_preallocated_destroy
SECP256K1_API void secp256k1_context_preallocated_destroy(secp256k1_context *ctx) SECP256K1_ARG_NONNULL(1)
secp256k1_context_preallocated_create
SECP256K1_API secp256k1_context * secp256k1_context_preallocated_create(void *prealloc, unsigned int flags) SECP256K1_ARG_NONNULL(1) SECP256K1_WARN_UNUSED_RESULT
secp256k1_context_preallocated_size
SECP256K1_API size_t secp256k1_context_preallocated_size(unsigned int flags) SECP256K1_WARN_UNUSED_RESULT
secp256k1_context_preallocated_clone
SECP256K1_API secp256k1_context * secp256k1_context_preallocated_clone(const secp256k1_context *ctx, void *prealloc) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_WARN_UNUSED_RESULT
external
secp256k1
include
secp256k1_preallocated.h
Generated on
for Electroneum by
1.17.0