Alloc stack using MemMap and -Xss
Change-Id: Ib6d52e41e62bf9cd111b2f03257ead53673d3e81
diff --git a/src/thread.h b/src/thread.h
index de5893e..4264a1a 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -10,6 +10,7 @@
#include "jni_internal.h"
#include "logging.h"
#include "macros.h"
+#include "mem_map.h"
#include "offsets.h"
#include "runtime.h"
@@ -115,7 +116,7 @@
static const size_t kDefaultStackSize = 64 * KB;
// Creates a new thread.
- static Thread* Create(size_t stack_size);
+ static Thread* Create(const Runtime* runtime);
// Creates a new thread from the calling thread.
static Thread* Attach(const Runtime* runtime);
@@ -292,6 +293,9 @@
// at the next poll.
int suspend_count_;
+ // The memory mapping of the stack for non-attached threads.
+ scoped_ptr<MemMap> stack_;
+
// The inclusive base of the control stack.
byte* stack_base_;