Python: gc.get_threshold() - Python Glossary

Publié le: 11 mars 2015
sur la chaîne: Code master
525
5

gc.get_threshold(threshold0, threshold1, threshold2)

You will see three numbers returned to us and these numbers are set at three different runs of the garbage collection. First one is ran when the allocations minus the deallocations exceed the number displayed.Default for threshold0 is 700. If the object survives the first run it is relocated into the second run. The second number returned to us is when the second garbage collection will run this is threshold1 of garbage collection this number is based on the number runs that threshold0 does. The succeeding generation default is 10 so in this case threshold0 run must run ten times before the threshold1 of garbage collection is ran. If an object survives the subsequent run it is now moved into the third and final run and the object will stay here until it is removed. Threshold2 will run based off threshold1 runs. The default is 10 threshold1 runs. So, when the threshold1 runs ten times the final generation will run.


Sur cette page du site, vous pouvez voir la vidéo en ligne Python: gc.get_threshold() - Python Glossary durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Code master 11 mars 2015, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 525 fois et il a aimé 5 téléspectateurs. Bon visionnage!