This repository has been archived by the owner on Oct 23, 2020. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This leak was found investigating the cause of the problem with:
E3SM-Project/E3SM#2041
The framework has some functions which manage config_pool storage used during halo exchanges. My halo data structure reuse code needs to directly modify some of these config values between exchanges but the framework currently only supports mpas_pool_add_config() and mpas_pool_remove_config() so that's what was used.
The add config allocates three elements: a mpas_pool_member_type, field of that which is mpas_pool_data_type, and a scalar member of that either int, real, char, or logical.
The remove config only deallocates the mpas_pool_member_type and the payload scalar, but forgets the mpas_pool_data_type. Along with a suspicious TODO comment speculating that there might be more to do.
Under previous circumstances this add_config to remove_config cycle didn't happen enough to drive an OOM, but the heavier usage by my reuse code does.