Commit 1513397d authored by John Ballance's avatar John Ballance
Browse files

tuned memory recovery in addmessage in Wimp09 to take account of the...

tuned memory recovery in addmessage in Wimp09 to take account of the granularity of RMA allocation. now does not consume/not return rma

Detail:
Admin: castle added ip


Version 4.97. Tagged as 'Wimp-4_97'
parent 26b8fd97
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
GBLS Module_HelpVersion GBLS Module_HelpVersion
GBLS Module_ComponentName GBLS Module_ComponentName
GBLS Module_ComponentPath GBLS Module_ComponentPath
Module_MajorVersion SETS "4.96" Module_MajorVersion SETS "4.97"
Module_Version SETA 496 Module_Version SETA 497
Module_MinorVersion SETS "" Module_MinorVersion SETS ""
Module_Date SETS "05 Jan 2006" Module_Date SETS "05 Jan 2006"
Module_ApplicationDate SETS "05-Jan-06" Module_ApplicationDate SETS "05-Jan-06"
Module_ComponentName SETS "Wimp" Module_ComponentName SETS "Wimp"
Module_ComponentPath SETS "RiscOS/Sources/Desktop/Wimp" Module_ComponentPath SETS "RiscOS/Sources/Desktop/Wimp"
Module_FullVersion SETS "4.96" Module_FullVersion SETS "4.97"
Module_HelpVersion SETS "4.96 (05 Jan 2006)" Module_HelpVersion SETS "4.97 (05 Jan 2006)"
END END
/* (4.96) /* (4.97)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.2. * Last processed by srccommit version: 1.2.
* *
*/ */
#define Module_MajorVersion_CMHG 4.96 #define Module_MajorVersion_CMHG 4.97
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 05 Jan 2006 #define Module_Date_CMHG 05 Jan 2006
#define Module_MajorVersion "4.96" #define Module_MajorVersion "4.97"
#define Module_Version 496 #define Module_Version 497
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "05 Jan 2006" #define Module_Date "05 Jan 2006"
...@@ -18,6 +18,6 @@ ...@@ -18,6 +18,6 @@
#define Module_ComponentName "Wimp" #define Module_ComponentName "Wimp"
#define Module_ComponentPath "RiscOS/Sources/Desktop/Wimp" #define Module_ComponentPath "RiscOS/Sources/Desktop/Wimp"
#define Module_FullVersion "4.96" #define Module_FullVersion "4.97"
#define Module_HelpVersion "4.96 (05 Jan 2006)" #define Module_HelpVersion "4.97 (05 Jan 2006)"
#define Module_LibraryVersionInfo "4:96" #define Module_LibraryVersionInfo "4:97"
...@@ -613,7 +613,7 @@ addmessages Entry "R0-R7" ...@@ -613,7 +613,7 @@ addmessages Entry "R0-R7"
STRNE R6,[R2],#4 ; copy a message number STRNE R6,[R2],#4 ; copy a message number
BNE %BT20 ; loop back until all checked BNE %BT20 ; loop back until all checked
Pull "R2,R3" Pull "R2,R6"
B sortmessages ; ensure they are sorted B sortmessages ; ensure they are sorted
;.............................................................................. ;..............................................................................
...@@ -672,7 +672,9 @@ addmoremessages ...@@ -672,7 +672,9 @@ addmoremessages
BNE %BT40 ; loop back until found BNE %BT40 ; loop back until found
B %BT30 ; if it doesn't then try another entry B %BT30 ; if it doesn't then try another entry
50 SUBS r3, r6, r5 ; jb/ma 4/1/06 check what we did not use 50 LDR r3,[r2,#-4] ; jb/ma 4/1/06 check size block actually is
SUB r3,r3,#4 ; jb/ma 4/1/06 compensate for this block count
SUBS r3,r6,r3 ; jb/ma 4/1/06 check what we did not use
; and give back any unused ; and give back any unused
; MOV R3,R6 ; MOV R3,R6
MOVNE R0,#ModHandReason_ExtendBlock MOVNE R0,#ModHandReason_ExtendBlock
...@@ -687,9 +689,9 @@ addmoremessages ...@@ -687,9 +689,9 @@ addmoremessages
; STR R3,[R4,#task_messagessize] ; STR R3,[R4,#task_messagessize]
sortmessages sortmessages
Debug msgsel,"sort list at, size =",R2,R3 Debug msgsel,"sort list at, size =",R2,R6
MOV R0,R3,LSR #2 ; size of the list to be sorted MOV R0,R6,LSR #2 ; size of the list to be sorted
MOV R1,R2 ; -> list to be sorted MOV R1,R2 ; -> list to be sorted
MOV R2,#0 ; sorting unsigned integers MOV R2,#0 ; sorting unsigned integers
TST R1,#2_111:SHL:29 TST R1,#2_111:SHL:29
...@@ -796,11 +798,12 @@ removemessages Entry "R1-R2,R4-R8" ...@@ -796,11 +798,12 @@ removemessages Entry "R1-R2,R4-R8"
40 40
LDR R3,[R4,#task_messagessize] ; old size LDR R3,[R4,#task_messagessize] ; old size
STR R6,[R4,#task_messagessize] ; new size STR R6,[R4,#task_messagessize] ; new size
block count
SUBS r3,r6,r3 ; jb/ma 4/1/06 check what we did not use
; and give back any unused
SUBS R3,R6,R3 ; compute changed size needed MOVNE R0,#ModHandReason_ExtendBlock
LDR R2,[R4,#task_messages] BLNE XROS_Module ; attempt to reduce the block size
MOV R0,#ModHandReason_ExtendBlock
BL XROS_Module ; attempt to reduce the block size
STRVC R2,[R4,#task_messages] ; and then store updated block pointer STRVC R2,[R4,#task_messages] ; and then store updated block pointer
Debug msgsel,"after extend block: size of list =",R2,R6 Debug msgsel,"after extend block: size of list =",R2,R6
......
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