OS_ChangeDynamicArea tweaks and fixes
Jeffrey Lee authored
Detail:
  s/ChangeDyn - A few fixes to make behaviour be a closer match for the pre-PMP code, and a bit of tidying to get rid of redundant code paths:
  - Remove shrinkable DA checks from AreaShrink - the source of the op is never the free pool, so TryToShrinkShrinkables wouldn't have done anything anyway
  - Fix ShrinkFreePoolToAppSpace to behave more like old OS_ChangeDynamicArea when it was asked to shrink the free pool - allow partial moves (if move amount too large to fit in app space), shrink shrinkables if free pool is unable to satisfy request, and call CheckAppSpace to make sure app space is OK with being changed
  - Remove redundant logic from AreaGrow for clamping grow size to free pool max size (if dest was free pool - dest will never be free pool with current implementation). "Dest is apl space, moving reduced amount" comment was also inaccurate.
  - Fix AreaGrow logic for taking memory from application space to only do so if the dest isn't application space (I can't see anything in the old implementation to protect against this - but, then again, the old implementation didn't seem to fully deal with grows of application space properly anyway, e.g. MemLimit would be updated on a free pool shrink, but not on an app space grow)
  - Add extra sanity check to AreaGrow after taking memory from application space
Admin:
  Tested on iMx6
  Fixes issue with application space having little or no memory if not booting to desktop (due to free pool shrink performed by kernel failing due to shrink amount being larger than app space max size)


Version 5.35, 4.79.2.291. Tagged as 'Kernel-5_35-4_79_2_291'
c1a39dfd
Name Last commit Last update
..
AMBControl Misc memory management tweaks & fixes
PMF Change some default CMOS settings, using custom build switch
vdu Add initial support for "physical memory pools"
ARM600 Add initial support for "physical memory pools"
ARMops Fix examination of L2 cache
Arthur2 Make OS_GSTrans be more sensible about what it treats as system variables
Arthur3 Review of Internation switch
ArthurSWIs Add OS_Memory 24 implementation. Change OS_ValidateAddress to use it. Fix kernel leaving the physical access MB in a messy state. Try and protect against infinite abort loops caused by bad environment handlers.
ChangeDyn OS_ChangeDynamicArea tweaks and fixes
Convrsions Add OS_Memory 24 implementation. Change OS_ValidateAddress to use it. Fix kernel leaving the physical access MB in a messy state. Try and protect against infinite abort loops caused by bad environment handlers.
End Commit of kernel as featured in release 5.00.
ExtraSWIs Add zero page relocation support
FlashROM 32-bit Kernel.
GetAll Replace WriteBuffer_Drain ARMop with a suite of memory barrier ARMops
HAL Add initial support for "physical memory pools"
HeapMan Sort out SetBorder
HeapSort Add compressed ROM support. Make more use of ARMv5+ instructions. Other misc tweaks.
KbdResA1 32-bit Kernel.
KbdResPC Add zero page relocation support
KbdResRCMM Reimplement enhancements to kernel Dynamic Area support from
Kernel Replace WriteBuffer_Drain ARMop with a suite of memory barrier ARMops
LibKern More HAL work. IOMD HAL work in progress. Lots of my own little build scripts. Don't touch this.
MEMC1 Import from cleaned 360 CD
MEMC2 Import from cleaned 360 CD
MOSDict Import from cleaned 360 CD
MemInfo
Middle
ModHand
MoreComms
MoreSWIs
Morris
MsgCode
NewIRQs
NewReset
Oscli
SWINaming
Super1
SysComms
TickEvents
UnSqueeze
Utility
VMSAv6