Bitcoin
Classes | Macros | Typedefs | Functions
scratch.h File Reference

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)
 
static void secp256k1_scratch_deallocate_frame (secp256k1_scratch *scratch)
 
static size_t secp256k1_scratch_max_allocation (const secp256k1_scratch *scratch, size_t n_objects)
 
static void * secp256k1_scratch_alloc (secp256k1_scratch *scratch, size_t n)
 

Macro Definition Documentation

◆ SECP256K1_SCRATCH_MAX_FRAMES

#define SECP256K1_SCRATCH_MAX_FRAMES   5

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

◆ 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

◆ secp256k1_scratch_create()

static secp256k1_scratch* secp256k1_scratch_create ( const secp256k1_callback error_callback,
size_t  max_size 
)
static

◆ secp256k1_scratch_deallocate_frame()

static void secp256k1_scratch_deallocate_frame ( secp256k1_scratch scratch)
static

Deallocates a stack frame

◆ secp256k1_scratch_destroy()

static void secp256k1_scratch_destroy ( secp256k1_scratch scratch)
static

◆ 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