[Lldb-commits] [lldb] r146640 - in /lldb/trunk: include/lldb/API/SBDebugger.h scripts/Python/interface/SBDebugger.i source/API/SBDebugger.cpp

Greg Clayton gclayton at apple.com
Wed Dec 14 20:38:41 PST 2011


Author: gclayton
Date: Wed Dec 14 22:38:41 2011
New Revision: 146640

URL: http://llvm.org/viewvc/llvm-project?rev=146640&view=rev
Log:
<rdar://problem/10584789>

Added a static memory pressure function in SBDebugger:

    void SBDebugger::MemoryPressureDetected ()

This can be called by applications that detect memory pressure to cause LLDB to release cached information.


Modified:
    lldb/trunk/include/lldb/API/SBDebugger.h
    lldb/trunk/scripts/Python/interface/SBDebugger.i
    lldb/trunk/source/API/SBDebugger.cpp

Modified: lldb/trunk/include/lldb/API/SBDebugger.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBDebugger.h?rev=146640&r1=146639&r2=146640&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBDebugger.h (original)
+++ lldb/trunk/include/lldb/API/SBDebugger.h Wed Dec 14 22:38:41 2011
@@ -35,6 +35,9 @@
     static void
     Destroy (lldb::SBDebugger &debugger);
 
+    static void
+    MemoryPressureDetected ();
+
     SBDebugger();
 
     SBDebugger(const lldb::SBDebugger &rhs);

Modified: lldb/trunk/scripts/Python/interface/SBDebugger.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBDebugger.i?rev=146640&r1=146639&r2=146640&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBDebugger.i (original)
+++ lldb/trunk/scripts/Python/interface/SBDebugger.i Wed Dec 14 22:38:41 2011
@@ -122,6 +122,9 @@
     static void
     Destroy (lldb::SBDebugger &debugger);
 
+    static void
+    MemoryPressureDetected();
+
     SBDebugger();
 
     SBDebugger(const lldb::SBDebugger &rhs);

Modified: lldb/trunk/source/API/SBDebugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBDebugger.cpp?rev=146640&r1=146639&r2=146640&view=diff
==============================================================================
--- lldb/trunk/source/API/SBDebugger.cpp (original)
+++ lldb/trunk/source/API/SBDebugger.cpp Wed Dec 14 22:38:41 2011
@@ -124,6 +124,12 @@
         debugger.m_opaque_sp.reset();
 }
 
+void
+SBDebugger::MemoryPressureDetected ()
+{
+    ModuleList::RemoveOrphanSharedModules();    
+}
+
 SBDebugger::SBDebugger () :
     m_opaque_sp ()
 {





More information about the lldb-commits mailing list