1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

Made stack space configurable

This commit is contained in:
Brian Fiete 2020-08-10 14:45:29 -07:00
parent 2e3356d04a
commit 0783fd3318
2 changed files with 4 additions and 2 deletions

View file

@ -5,6 +5,7 @@ USING_NS_BF;
WorkThread::WorkThread()
{
mThread = NULL;
mStackSize = 1024 * 1024;
}
WorkThread::~WorkThread()
@ -23,7 +24,7 @@ static void BFP_CALLTYPE WorkThreadStub(void* param)
void WorkThread::Start()
{
mThread = BfpThread_Create(WorkThreadStub, (void*)this, 256 * 1024, BfpThreadCreateFlag_StackSizeReserve);
mThread = BfpThread_Create(WorkThreadStub, (void*)this, mStackSize, BfpThreadCreateFlag_StackSizeReserve);
}
void WorkThread::Stop()

View file

@ -8,6 +8,7 @@ class WorkThread
{
public:
BfpThread* mThread;
int mStackSize;
public:
WorkThread();
@ -25,7 +26,7 @@ class WorkThreadFunc : public WorkThread
{
public:
void (*mFunc)(void*);
void* mParam;
void* mParam;
public:
// Note: this startProc signature does not match BfpThreadStartProc -- here we abstract out the calling convention to be default