[Lldb-commits] [PATCH] Make ModuleCache::Get to return instantiated ModuleSP instance so already created in-memory instance can be returned instead of creating a new one.
ovyalov at google.com
Wed Mar 11 14:51:45 PDT 2015
Hi clayborg, tberghammer,
ModuleCache::Get used to return a new ModuleSP instance for the same module spec that may lead to multiple loaded modules for the same shared library.
This CL addresses this issue by storing weak Module pointers within map<UUID, weak_ptr<Module>> - if ModuleCache::Get finds already created module by UUID and it's not null then an existing module instance will be returned.
I'm planning to use this change in future to enforce LRU policy on cache - with map of loaded modules at hand, it will be easy to detect in-use modules.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8793 bytes
Desc: not available
More information about the lldb-commits