news
About Elegant Chaos
info
About me and my friends
people
Software from Elegant Chaos
software
Other stuff...
stuff

BL_CheckForCompact

Revision
Revised on

Description


Code

on BL_CheckForCompact
  -- compacts stack if it is time to do so
  
  global BL_CompactThreshold
  
  get the freeSize of this stack / the size of this stack
  if it > BL_CompactThreshold then
    if not BL_ResourcesInUse() then
      UL_PutMsg "Compacting stack"
      
      put (the short name of this stack is in the stacksInUse) into inUse
      if inUse then
        stop using this stack
      end if
      
      doMenu "Compact stack" without dialog
      if inUse then
        start using this stack
      end if
      UL_CloseMsg
    end if
  end if
  
end BL_CheckForCompact