Page MenuHomePhabricator

scratch space: use single allocation
ClosedPublic

Authored by deadalnix on Tue, Feb 4, 00:44.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC78a23457ff35: scratch space: use single allocation
Summary
  • scratch: add magic bytes to beginning of structure
  • scratch space: thread error_callback into all scratch space functions

Use it when checking magic bytes

  • scratch: unify allocations
  • scratch: rename max_size to size, document that extra will actually be allocated
  • scratch: save a couple bytes of unnecessarily-allocated memory
  • scratch: replace frames with "checkpoint" system

This is a backport of secp256k1 PR600

Test Plan
ninja check-secp256k1

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

deadalnix created this revision.Tue, Feb 4, 00:44
Herald added a reviewer: Restricted Project. · View Herald TranscriptTue, Feb 4, 00:44
Fabien accepted this revision.Wed, Feb 5, 15:03
This revision is now accepted and ready to land.Wed, Feb 5, 15:03
This revision was automatically updated to reflect the committed changes.