[SharedCache] Limit sections being added in SharedCache::InitializeHeader to the regions being loaded#6459
Conversation
|
I actually wanted to do a lot more with this PR in regards to section loading but I'm unsure what the desire is and a reasonable amount of code will need modifying. Currently the user can It makes sense to be more granular as some segments do contain a number of sections but this will realistically require the metadata to be modified to track when a memory region (representing an image segment) has only be partially loaded due to not all of its sections being loaded. I think either This is personal opinion so it would be good to hear what the devs think o this before I push a PR. |
…eader` to the regions being loaded The logic before would default to adding a section unless it was from a region in the `regionsToLoad` argument and its header had already been initialized. However if a user does `Load Section by Address` then there's only one region in `regionsToLoad`. All sections not in that region would be automatically added, even if they had already been or the user hadn't requested them to be loaded.
9f32213 to
3d73ec6
Compare
|
I went ahead and merged this as the fix is solid.
I think it would be good to make an issue regarding your thoughts on this to prompt further discussion, I've been moving towards segment loading as it made the code much easier to deal with (and left this feature out of the KernelCache loader entirely.) If we do target single section rather than segment, a large swathe of stuff needs to be rethought to work with sections, e.g. how we build the The language absolutely needs updated in certain areas. I'd love to get more input from people using this specific feature. |
The logic before would default to adding a section unless it was from a region in the
regionsToLoadargument and its header had already been initialized. However if a user doesLoad Section by Addressthen there's only one region inregionsToLoad. All sections not in that region would be automatically added, even if they had already been or the user hadn't requested them to be loaded.