mirror of https://github.com/deadw00d/AROS.git
Set minimum stack size.
Allowing low values of stack (like 4096) causes crashes on hosted. Also confirmed that MorphOS sets minimum value here.
This commit is contained in:
parent
84313d33e3
commit
29802b386d
|
@ -127,7 +127,7 @@ static const struct newMemList MemTemplate =
|
|||
break;
|
||||
|
||||
case TASKTAG_STACKSIZE:
|
||||
nml.nml_ME[1].me_Length = AROS_ALIGN(tag->ti_Data);
|
||||
nml.nml_ME[1].me_Length = AROS_ALIGN((ULONG)tag->ti_Data);
|
||||
break;
|
||||
|
||||
case TASKTAG_NAME:
|
||||
|
@ -161,6 +161,14 @@ static const struct newMemList MemTemplate =
|
|||
}
|
||||
}
|
||||
|
||||
/* We need a minimum stack to handle interrupt contexts. Additionally confirned on MorphOS that
|
||||
it sets a minimum fixed size of stack */
|
||||
if (nml.nml_ME[1].me_Length < AROS_STACKSIZE)
|
||||
{
|
||||
nml.nml_ME[1].me_Length = AROS_STACKSIZE;
|
||||
}
|
||||
|
||||
|
||||
DADDTASK("NewCreateTaskA: name %s", taskname ? taskname : "<NULL>");
|
||||
|
||||
ml = NewAllocEntry((struct MemList *)&nml, NULL);
|
||||
|
|
Loading…
Reference in New Issue