You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current Patina SDK pulls alloc for a few sub-modules unnecessarily.
Specifically,
For pi/hob.rs, there is unconditional consumption of Vec and Box, which requires global allocator. This should not be the case for a PI standard hob crate.
For pi/fw_fs.rs, the code uses Vec to represent the block map entries.
In addition, some sub-modules are including alloc through extern crate alloc; unconditionally. This will cause the top-level switch, the "alloc" feature flag, not functional without sprinkling the preprocessors.
The suggestion is that extern crate alloc; should only be used from the crate root, which allows the feature flag to guard the module dependencies from a central location.
Expected Behavior
At least for pi/hob, we should be able to use the normal functionalities and definitions.
Or for fw_fs and its consumers, we should guard out the sub-module from the top level.
In addition, we should remove all the extern crate alloc; in the nine realms.
Activity
[patina/sdk] clean up the usage of allocator (#1401)