Save the address of memory allocated on the plugin heap

This commit is contained in:
Maschell
2020-05-03 12:23:50 +02:00
parent 53f454f6ed
commit c1c7594926
4 changed files with 16 additions and 1 deletions

View File

@@ -159,6 +159,9 @@ bool PluginContainerPersistence::savePlugin(plugin_information_t * pluginInforma
}
}
plugin_data->info.trampolinId = pluginInfo.getTrampolinId();
plugin_data->info.allocatedTextMemoryAddress = pluginInfo.allocatedTextMemoryAddress;
plugin_data->info.allocatedDataMemoryAddress = pluginInfo.allocatedDataMemoryAddress;
/* Copy plugin data */
auto pluginData = plugin.getPluginData();
@@ -219,6 +222,8 @@ std::vector<PluginContainer> PluginContainerPersistence::loadPlugins(plugin_info
PluginInformation pluginInformation;
pluginInformation.setTrampolinId(plugin_data->info.trampolinId);
pluginInformation.allocatedTextMemoryAddress = plugin_data->info.allocatedTextMemoryAddress;
pluginInformation.allocatedDataMemoryAddress = plugin_data->info.allocatedDataMemoryAddress;
for(uint32_t i = 0; i < MAXIMUM_PLUGIN_SECTION_LENGTH; i++) {
plugin_section_info_t * sectionInfo = &(plugin_data->info.sectionInfos[i]);