Added an allocated memory cache to avoid having to allocate memory over and
over when running JITed expressions. The allocated memory cache will cache 
allocate memory a page at a time for each permission combination and divvy up
the memory and hand it out in 16 byte increments. 

llvm-svn: 131453
diff --git a/lldb/source/Core/State.cpp b/lldb/source/Core/State.cpp
index 9268704..ad73ba8 100644
--- a/lldb/source/Core/State.cpp
+++ b/lldb/source/Core/State.cpp
@@ -84,6 +84,31 @@
     return unknown_format_string;
 }
 
+
+const char *
+lldb_private::GetPermissionsAsCString (uint32_t permissions)
+{
+    switch (permissions)
+    {
+        case 0:                      return "---";
+        case ePermissionsWritable:   return "-w-";
+        case ePermissionsReadable:   return "r--";
+        case ePermissionsExecutable: return "--x";
+        case ePermissionsReadable | 
+             ePermissionsWritable:   return "rw-";
+        case ePermissionsReadable | 
+             ePermissionsExecutable: return "r-x";
+        case ePermissionsWritable | 
+             ePermissionsExecutable: return "-wx";        
+        case ePermissionsReadable | 
+             ePermissionsWritable | 
+             ePermissionsExecutable: return "rwx";
+        default: 
+            break;
+    }
+    return "???";
+}
+
 bool
 lldb_private::StateIsRunningState (StateType state)
 {