Index: src/orca/default.py
===================================================================
--- src/orca/default.py	(revision 2440)
+++ src/orca/default.py	(working copy)
@@ -457,6 +457,11 @@
                 #
                 _("Toggles whether to read just the current table cell or the whole row."))
 
+        self.inputEventHandlers["dumpMemoryStatsHandler"] = \
+            input_event.InputEventHandler(
+                Script.dumpMemoryStats,
+                _("Write out statistics on current memory usage to stdout."))
+
         self.inputEventHandlers["readCharAttributesHandler"] = \
             input_event.InputEventHandler(
                 Script.readCharAttributes,
@@ -1238,6 +1243,20 @@
 
         keyBindings.add(
             keybindings.KeyBinding(
+                "F12",
+                1 << settings.MODIFIER_ORCA,
+                1 << settings.MODIFIER_ORCA,
+                self.inputEventHandlers["dumpMemoryStatsHandler"]))
+
+        keyBindings.add(
+            keybindings.KeyBinding(
+                "SunF37",
+                1 << settings.MODIFIER_ORCA,
+                1 << settings.MODIFIER_ORCA,
+                self.inputEventHandlers["dumpMemoryStatsHandler"]))
+
+        keyBindings.add(
+            keybindings.KeyBinding(
                 "f",
                 1 << settings.MODIFIER_ORCA,
                 1 << settings.MODIFIER_ORCA,
@@ -2960,6 +2979,14 @@
 
         return True
 
+    def dumpMemoryStats(self, inputEvent=None):
+        """Write out statistics on current memory usage to stdout."""
+
+        print "dumpMemoryStats-----------------START---------------------"
+        print "Size of Accessible._cache: ", len(atspi.Accessible._cache)
+        print "Number of known scripts: ", len(orca._PRESENTATION_MANAGERS[0]._knownScripts)
+        print "dumpMemoryStats-----------------END---------------------"
+
     def textAttrsToDictionary(self, str):
         """Converts a string of text attribute tokens of the form
         <key>:<value>; into a dictionary of keys and values.
