Skip to content

Conversation

@fogti
Copy link

@fogti fogti commented Nov 1, 2025

Summary of the PR

This PR reduces the amount of intermediate allocations done in property_string and property_string_list.
This doesn't change the public interface at all, but should also make it easier to avoid intermediate allocations in the future. (see also PR #76 as something it might be utilized in conjunction with).

Background: vm-fdt is used by https://github.com/hermit-os/loader/blob/0c1c1a819fa77016672a620ebaa44e79b8c95599/src/fdt.rs, which is an environment where we want to avoid allocations, particularly of small, intermediate buffers as much as possible, particularly when such buffers aren't a necessity and can be avoided relatively easily.

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR have Signed-Off-By trailers (with
    git commit -s), and the commit message has max 60 characters for the
    summary and max 75 characters for each description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

This doesn't change the public interface at all, but should also make it easier
to avoid intermediate allocations in the future.

Signed-off-by: Ellen Εμιλία Άννα Zscheile <[email protected]>
@fogti fogti requested a review from danielverkamp November 3, 2025 12:29
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.

2 participants