Bitcoin Core  0.19.99
P2P Digital Currency
Classes | Macros | Typedefs | Functions
scratch.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  secp256k1_scratch_space_struct
 

Macros

#define SECP256K1_SCRATCH_MAX_FRAMES   5
 

Typedefs

typedef struct secp256k1_scratch_space_struct secp256k1_scratch
 

Functions

static secp256k1_scratchsecp256k1_scratch_create (const secp256k1_callback *error_callback, size_t max_size)
 
static void secp256k1_scratch_destroy (secp256k1_scratch *scratch)
 
static int secp256k1_scratch_allocate_frame (secp256k1_scratch *scratch, size_t n, size_t objects)
 Attempts to allocate a new stack frame with n available bytes. More...
 
static void secp256k1_scratch_deallocate_frame (secp256k1_scratch *scratch)
 Deallocates a stack frame. More...
 
static size_t secp256k1_scratch_max_allocation (const secp256k1_scratch *scratch, size_t n_objects)
 Returns the maximum allocation the scratch space will allow. More...
 
static void * secp256k1_scratch_alloc (secp256k1_scratch *scratch, size_t n)
 Returns a pointer into the most recently allocated frame, or NULL if there is insufficient available space. More...
 

Macro Definition Documentation

◆ SECP256K1_SCRATCH_MAX_FRAMES

#define SECP256K1_SCRATCH_MAX_FRAMES   5

Definition at line 10 of file scratch.h.

Typedef Documentation

◆ secp256k1_scratch

Function Documentation

◆ secp256k1_scratch_alloc()

static void* secp256k1_scratch_alloc ( secp256k1_scratch scratch,
size_t  n 
)
static

Returns a pointer into the most recently allocated frame, or NULL if there is insufficient available space.

Here is the caller graph for this function:

◆ secp256k1_scratch_allocate_frame()

static int secp256k1_scratch_allocate_frame ( secp256k1_scratch scratch,
size_t  n,
size_t  objects 
)
static

Attempts to allocate a new stack frame with n available bytes.

Returns 1 on success, 0 on failure

Here is the caller graph for this function:

◆ secp256k1_scratch_create()

static secp256k1_scratch* secp256k1_scratch_create ( const secp256k1_callback error_callback,
size_t  max_size 
)
static
Here is the caller graph for this function:

◆ secp256k1_scratch_deallocate_frame()

static void secp256k1_scratch_deallocate_frame ( secp256k1_scratch scratch)
static

Deallocates a stack frame.

Here is the caller graph for this function:

◆ secp256k1_scratch_destroy()

static void secp256k1_scratch_destroy ( secp256k1_scratch scratch)
static
Here is the caller graph for this function:

◆ secp256k1_scratch_max_allocation()

static size_t secp256k1_scratch_max_allocation ( const secp256k1_scratch scratch,
size_t  n_objects 
)
static

Returns the maximum allocation the scratch space will allow.

Here is the caller graph for this function: