Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

free unknown EOS VM OC codegen versions from the code cache #8771

Merged
merged 1 commit into from Mar 10, 2020

Conversation

spoonincode
Copy link
Contributor

Change Description

Code stored in EOS VM OC's code cache has a "code gen version" attached to it. This is always the value 0 now. The idea was in the future if EOS VM OC's code generation changes (due to a new optimization, or some other improvement), nodeos could make a determination to still run code gen version 0 while code gen version 1 is being compiled. That way there is no gap in time for when EOS VM OC can be used for a contract on a nodeos upgrade.

Yes, there are considerable limitations in this approach (like that the code_descriptor layout can't change much), but it offers at least some flexibility.

There is code in place to ignore any entries in the cache with code gen version other than 0. This covers the case someone upgrades nodeos but then downgrades it. But just ignoring these entries leaks memory in the code cache. We need to free the memory when "dropping" code cache entries.

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

@spoonincode spoonincode merged commit b31a869 into develop Mar 10, 2020
@spoonincode spoonincode deleted the eosvmoc_free_future_codever branch March 10, 2020 17:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants