Add stack overflow check

Change-Id: I67fcb5ad4bda304879ce05561b03aa7cd46e9990
diff --git a/src/thread.h b/src/thread.h
index 6095407..9573458 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -166,6 +166,7 @@
     kTerminated,
   };
 
+  static const size_t kStackOverflowReservedBytes = 1024; // Space to throw a StackOverflowError in.
 
   static const size_t kDefaultStackSize = 64 * KB;
 
@@ -222,6 +223,7 @@
   StaticStorageBase* (*pInitializeStaticStorage)(uint32_t, const Method*);
   Field* (*pFindFieldFromCode)(uint32_t, const Method*);
   void (*pCheckSuspendFromCode)(Thread*);
+  void (*pStackOverflowFromCode)(Method*);
 
   class StackVisitor {
    public: