-
Notifications
You must be signed in to change notification settings - Fork 63
Implement LRU cache (#150) #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
* feat: update dependencies and implement LRU cache - bump spin to 0.10.0 and chrono to 0.4.43 - modify Makefile to disable VSOCK - add LRU cache implementation in core/src/lrucache.rs - refactor memory management to use new LRU cache methods * feat: enable VSOCK support in QEMU options * feat: remove uluru dependency from Cargo files * feat: reorganize lrucache module import in lib.rs and mm.rs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR replaces the external uluru dependency with a custom LRU cache implementation to address licensing concerns (implied by the PR title "fix license"). The implementation provides equivalent functionality for caching ELF file entries in the memory management module.
Changes:
- Implemented a custom
LruCachewith doubly-linked list structure using array indices - Migrated from
uluru::LRUCacheto the newLruCachein the memory management module - Removed the
ulurudependency from Cargo files and updatedchronoto version 0.4.43
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| core/src/lrucache.rs | New custom LRU cache implementation with fixed-size array storage and intrusive linked list |
| core/src/mm.rs | Updated to use new LruCache API (access, put, peek_mru, items, flush methods) |
| core/src/lib.rs | Added lrucache module to the module tree |
| core/Cargo.toml | Removed uluru dependency |
| Cargo.lock | Removed uluru package and updated chrono to 0.4.43 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…he more clearly and ensure that CAP is suitable for u16 index
feat: remove uluru dependency from Cargo files
feat: reorganize lrucache module import in lib.rs and mm.rs
Description
Implementation
Additional Context