Move mirror::ArtMethod to native

Optimizing + quick tests are passing, devices boot.

TODO: Test and fix bugs in mips64.

Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS.
Some of the savings are from removal of virtual methods and direct
methods object arrays.

Bug: 19264997
Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d
diff --git a/runtime/linear_alloc.h b/runtime/linear_alloc.h
index fcabcc8..c10ddfd 100644
--- a/runtime/linear_alloc.h
+++ b/runtime/linear_alloc.h
@@ -28,7 +28,10 @@
  public:
   explicit LinearAlloc(ArenaPool* pool);
 
-  void* Alloc(Thread* self, size_t size);
+  void* Alloc(Thread* self, size_t size) LOCKS_EXCLUDED(lock_);
+
+  // Realloc never frees the input pointer, it is the caller's job to do this if necessary.
+  void* Realloc(Thread* self, void* ptr, size_t old_size, size_t new_size) LOCKS_EXCLUDED(lock_);
 
   // Allocate and construct an array of structs of type T.
   template<class T>
@@ -37,7 +40,12 @@
   }
 
   // Return the number of bytes used in the allocator.
-  size_t GetUsedMemory() const;
+  size_t GetUsedMemory() const LOCKS_EXCLUDED(lock_);
+
+  ArenaPool* GetArenaPool() LOCKS_EXCLUDED(lock_);
+
+  // Return true if the linear alloc contrains an address.
+  bool Contains(void* ptr) const;
 
  private:
   mutable Mutex lock_ DEFAULT_MUTEX_ACQUIRED_AFTER;