Skip to content

Add O_SHORTLIVED to reduce memory fragmentation with short-lived files#936

Open
rasky wants to merge 1 commit into
DragonMinded:previewfrom
rasky:shortlived
Open

Add O_SHORTLIVED to reduce memory fragmentation with short-lived files#936
rasky wants to merge 1 commit into
DragonMinded:previewfrom
rasky:shortlived

Conversation

@rasky

@rasky rasky commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

This PR adds support for a custom open flag O_SHORTLIVED that informs libdragon filesystems that a file is going to be opened for a very short of time. Filesystems that know about this flag can for instance allocate the file descriptors in scratch memory.

All existing filesystems are updated to honor the flag. Moreover, asset_load is updated to specify O_SHORTLIVED, as that's a good case where it should be useful.

TODO: waiting for confirmation this actually helps

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