Skip to content

Drop C malloc entirely; rename NativeLibrary.rocksdb back to downcall - #351

Merged
dfa1 merged 3 commits into
mainfrom
drop-malloc
Nov 15, 2026
Merged

dfa1 merged 3 commits into
mainfrom
drop-malloc

Conversation

@dfa1

@dfa1 dfa1 commented Nov 15, 2026

Copy link
Copy Markdown
Owner
  • RocksIterator's size_t* length out-param is now a heap long[1], passed through critical(true) rocksdb_iter_key/_value downcalls. Both only read the current entry's Slice (db/c.cc), so they can't block. That removes the last malloc user, so NativeCalls.malloc and NativeLibrary.libc are deleted.
  • NativeLibrary.rocksdb is renamed back to NativeLibrary.downcall and now has javadoc.
  • The no-libc rule is documented in AGENTS.md and CONTRIBUTING.md. ADR 0007 notes that the iterator's critical calls are an exception made to drop malloc, not a speed claim.

Follows #350, which already moved MergeOperator off malloc (a no-op delete_value hook plus a per-thread scratch buffer).

🤖 Generated with Claude Code

dfa1 and others added 3 commits November 15, 2026 20:58
RocksIterator's size_t out-param is now a heap long[1], passed through
critical(true) key/value downcalls (pure Slice accessors). That removes the
last malloc user, so NativeCalls.malloc and NativeLibrary.libc go. Documents
the no-libc rule in AGENTS.md, CONTRIBUTING.md and ADR 0007.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dfa1
dfa1 merged commit 13cba3c into main Nov 15, 2026
7 checks passed
@dfa1
dfa1 deleted the drop-malloc branch November 15, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant