Crate bitcoinsecp256k1_scratch

Source

Structs§

Scratch
| Opaque data structure that holds rewriteable | “scratch space” | | The purpose of this structure is to replace | dynamic memory allocations, because | we target architectures where this | may not be available. It is essentially | a resizable (within specified parameters) | block of bytes, which is initially created | either by memory allocation or TODO | as a pointer into some fixed rewritable | space. | | Unlike the context object, this cannot | safely be shared between threads without | additional synchronization logic. |

Functions§

scratch_alloc
| Returns a pointer into the most recently | allocated frame, or NULL if there is | insufficient available space |
scratch_apply_checkpoint
| Applies a check point received from | scratch_checkpoint, undoing all | allocations since that point. |
scratch_checkpoint
| Returns an opaque object used to “checkpoint” | a scratch space. Used with scratch_apply_checkpoint | to undo allocations. |
scratch_create
scratch_destroy
scratch_max_allocation
| Returns the maximum allocation the | scratch space will allow |