[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.
    Oleksiy Vyalov 
    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.
http://reviews.llvm.org/D8270
Files:
  include/lldb/Target/Platform.h
  source/Target/Platform.cpp
  source/Utility/ModuleCache.cpp
  source/Utility/ModuleCache.h
EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8270.21767.patch
Type: text/x-patch
Size: 8793 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150311/693b81fe/attachment.bin>
    
    
More information about the lldb-commits
mailing list