Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

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.

Referenced by secp256k1_scratch_allocate_frame().

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.

Referenced by run_scratch_tests(), secp256k1_ecmult_pippenger_batch(), and secp256k1_ecmult_strauss_batch().

◆ 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

Referenced by run_scratch_tests(), secp256k1_ecmult_pippenger_batch(), secp256k1_ecmult_strauss_batch(), and test_ecmult_multi_pippenger_max_points().

◆ secp256k1_scratch_create()

◆ secp256k1_scratch_deallocate_frame()

static void secp256k1_scratch_deallocate_frame ( secp256k1_scratch scratch)
static

◆ secp256k1_scratch_destroy()

◆ 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.

Referenced by run_scratch_tests(), secp256k1_pippenger_max_points(), and secp256k1_strauss_max_points().

Released under the MIT license