As noted in the PR, the problem is that we make a request for additional
stack that violates the constraints on some systems.
This patch chooses a value that is divisible by common OS page sizes.
TODO: the user value should be checked and then an exception thrown if it
is not suitable.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
PR modula2/108405
gcc/m2/ChangeLog:
* gm2-libs-iso/Preemptive.mod (initPreemptive): Use a value for
extra space that is divisible by common OS pagesizes.
CONST
debugging = FALSE ;
+ (* The space we request becomes part of a stack request, which generally
+ has constraints on size and alignment. *)
+ extraWorkSpace = 10 * 1024 * 1024 ;
(*
timer - the timer process which runs at maximum scheduling priority with
IF NOT init
THEN
init := TRUE ;
- Create (timer, 10000000, MAX (Urgency), NIL, timerId) ;
+ Create (timer, extraWorkSpace, MAX (Urgency), NIL, timerId) ;
Activate (timerId)
END
END initPreemptive ;