Télécharger menage.eso

Retour à la liste

Numérotation des lignes :

menage
  1. C MENAGE SOURCE PV090527 23/03/31 21:15:08 11649
  2. C SUPPRIMER LES SEGMENTS INDESIRABLES
  3. C
  4. SUBROUTINE MENAGE(IAUTOM)
  5. *
  6. IMPLICIT INTEGER(I-N)
  7. integer iautom
  8. integer icolac
  9. integer iplaob, iplaoc
  10. integer iretou
  11. integer nomlus
  12.  
  13. -INC PPARAM
  14. -INC CCOPTIO
  15. -INC CCASSIS
  16. -INC CCNOYAU
  17. -INC SMELEME
  18. -INC SMTABLE
  19. -INC SMLENTI
  20. -INC SMCOORD
  21.  
  22. INTEGER NACTI
  23. INTEGER NTAACT
  24. INTEGER MACTIP
  25. INTEGER MTOTAP
  26. INTEGER MTOTA
  27. INTEGER MSEGMP
  28. INTEGER MACTI
  29.  
  30. SAVE NACTI
  31. SAVE NTAACT
  32. SAVE MACTIP
  33. SAVE MTOTAP
  34. SAVE MTOTA
  35. SAVE MSEGMP
  36. SAVE MACTI
  37. data nacti/0/
  38.  
  39. SEGMENT ITLAC(0)
  40. INTEGER OOOVAL
  41. *
  42. CHARACTER*4 CMOT
  43. REAL*8 XPLTOT
  44. *
  45. if (nacti.eq.0) then
  46. C place totale disponible
  47. XPLTOT=(1.D0*OOOVAL(1,3) * OOOVAL(1,4))/2.D0+OOOVAL(1,1)
  48. IPLTOT=INT(MIN(XPLTOT,2.D9))
  49. MTOTA=IPLTOT
  50. NACTI = OOOVAL(2,3)
  51. NTAACT = OOOVAL(3,3)
  52. C initialisations pour le non menage
  53. MACTIP = OOOVAL(3,3)
  54. MTOTAP = OOOVAL(3,1)
  55. MSEGMP = OOOVAL(2,1)
  56. MACTI = OOOVAL(1,1)
  57. endif
  58. segdes mcoord
  59. cmot=' '
  60. call lircha(cmot, 0,iretou)
  61. if( iretou.ne.0) then
  62. if( cmot .eq.'OBLI')go to 1
  63. call refus
  64. endif
  65. C autres criteres de menage :
  66. IFMEN=0
  67. C + de 10% de la memoire active depuis la derniere fois
  68. MACTIC=OOOVAL(3,3)
  69. IF (MACTIC-MACTIP.gt.MACTI*0.1) IFMEN=1
  70. C + de 20% de la memoire totale depuis la derniere fois
  71. MTOTAC=OOOVAL(3,1)
  72. IF (MTOTAC-MTOTAP.gt.MTOTA*0.20) IFMEN=2
  73. C + de 15% de la memoire active en memoire totale depuis la derniere fois
  74. IF (MTOTAC-MTOTAP.gt.MACTI*0.15) IFMEN=3
  75. C + de 100000 segments depuis la derniere fois
  76. MSEGMC=OOOVAL(2,1)
  77. IF (MSEGMC-MSEGMP.gt.32000*max(1,nbescr)) IFMEN=4
  78. IF (IFMEN.LE.0) RETURN
  79. if (iimpi.ne.0) write (6,*) 'menage ',ifmen
  80.  
  81.  
  82.  
  83. 1 CONTINUE
  84. * horodatage
  85. call ooohor(0)
  86. SEGDES,IPILOC,mcoord
  87.  
  88. C * attention aux assistants ....
  89. if (NBESC.NE.0.and.imestr.ne.0) then
  90. if (iimpi .eq. 1234)
  91. & write(ioimp,*) ' il faut bloquer les assistants'
  92. mestra=imestr
  93. SEGACT MESTRA*MOD
  94. if (iimpi .eq. 1234)
  95. & write(ioimp,*) ' assistants en attente'
  96. * on passe en mode force
  97. call ooofrc(1)
  98. * lodesl=.true.
  99. call setass(1)
  100. end if
  101. call oooprl(1)
  102.  
  103. call chleha(1,0,0,0,0)
  104.  
  105. * on met NOMLU a 1 pour bloquer le decodage des instructions
  106. NOMLUS=NOMLU
  107. nomlu=1
  108. segini itlac
  109. call ecrcha('NOOP')
  110. call tasspo(itlac,icolac,meleme,1,0)
  111. segdes meleme
  112. *
  113. * icolac ,cree dans tasspo pointe sur les piles d'objets accessibles
  114. *
  115. CALL MENAG5(ICOLAC,0)
  116. *
  117. * QUELLE PLACE RESTE T'IL MAINTENANT
  118. IF(IIMPI.NE.0) write(IOIMP,12) mactip,mactic
  119. MACTIP=OOOVAL(3,3)
  120. MTOTAP=OOOVAL(3,1)
  121. MSEGMP=OOOVAL(2,1)
  122. 12 FORMAT( ' place occupée avant apres ',3I14)
  123. * CALL PLAC
  124. * CALL LIRENT(IPLRES,1,IRETOU)
  125. * EST-CE SUFFISANT ??
  126. * INTERR(1)=IPLRES
  127. * IF (IPLADE.NE.0.AND.IPLRES.LT.IPLADE) CALL ERREUR(436)
  128. * restauration de nomlu
  129. NOMLU=NOMLUS
  130. * retassement memoire y compris segment actifs
  131. * ?? call ooomta(lret,mtota)
  132.  
  133. C * attention aux assistants ....
  134. if (NBESC.NE.0.and.imestr.ne.0) then
  135. C * il faut liberer le segment de dialogue
  136. mestra=imestr
  137. * repasser en mode normal
  138. call ooofrc(0)
  139. SEGDES MESTRA
  140. * lodesl=.false.
  141. call setass(0)
  142. end if
  143. C JYY
  144. SEGDES MCOORD
  145. segact ipiloc
  146. call oooprl(0)
  147. END
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  

© Cast3M 2003 - Tous droits réservés.
Mentions légales