Please enable JavaScript to view this site.

ESL Documentation

Navigation: » No topics above this level «

FAQ_MemoryManagement_Q11_Sample2.eal

Scroll Prev Top Next More

subroutine MemWarning() is

 

integer Icon_LIV

        Percentage_LIV

 

string  Reply_LSV

        Message_LSV

 

  copy (MemoryStatistics.Current_pool_size / 

       (MemoryStatistics.Max_pool_size / 100)) to Percentage_LIV

  if (Percentage_LIV > 80) then

     if (MemoryStatistics.Current_pool_size > MemCurrentSize) then

        copy MemoryStatistics.Current_pool_size to MemCurrentSize

           if (Percentage_LIV > 90) then

              copy MessageCritical to Icon_LIV

              copy "Memory is critically low.\n" Percentage_LIV "% of memory used\n"

                   "Please save your work and close the application." to Message_LSV

           else

              copy MessageWarning to Icon_LIV

              copy "Memory is getting low.\n" Percentage_LIV "% of memory used" to Message_LSV

           end if

        copy ReplyToMessage("ESL Memory", Message_LSV, MessageOK, 1, Icon_LIV) to Reply_LSV

     end if

  end if