Commit 21d01ef8 authored by Ben Avison's avatar Ben Avison
Browse files

The application space size returned from OS_ChangeEnvironment includes the...

The application space size returned from OS_ChangeEnvironment includes the &8000 below the application slot, and our Message_MemoryMoved handler wasn't taking account of this, hence the way module tasks randomly acquired 32K wimpslots in the Task Manager! Also updates appslotsize variable on task switches, to remove some false positives.

Version 4.79. Not tagged
...@@ -228,6 +228,7 @@ servicememorymoved ...@@ -228,6 +228,7 @@ servicememorymoved
MOV R1,#0 MOV R1,#0
SWI XOS_ChangeEnvironment SWI XOS_ChangeEnvironment
LDR R0,appspacesize LDR R0,appspacesize
SUB R1,R1,#ApplicationStart
TEQ R1,R0 TEQ R1,R0
Pull "R0-R6,PC", EQ Pull "R0-R6,PC", EQ
LDR R0,slotsize LDR R0,slotsize
...@@ -1120,6 +1121,10 @@ mapslotin ROUT ...@@ -1120,6 +1121,10 @@ mapslotin ROUT
LDR R14,taskhandle LDR R14,taskhandle
LDR R4,[wsptr,R14] ; NB task cannot be dead LDR R4,[wsptr,R14] ; NB task cannot be dead
ADD R4,R4,#task_environment ADD R4,R4,#task_environment
;
LDR R14,[R4,#12*ApplicationSpaceSize]
SUB R14,R14,#ApplicationStart
STR R14,appspacesize
; ;
MOV R0,#0 ; handler number MOV R0,#0 ; handler number
01 01
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment