little code which produces memory overflow [closed]

asked 2020-06-18 10:18:58 +0100

ortollj gravatar image

updated 2020-06-18 10:59:28 +0100

HI

UBUNTU 18.04 Sagemath 9.1 notebook.

just for information:

this little code saturates my computer memory if executed 3 or 4 times. if I run it 2 times the memory goes up 2 times and if I reset the kernel the occupied memory goes back down. if I saturate the PC memory by executing this code 3 or 4 times then my PC becomes unusable and I have to turn off my PC and turn it back on.

import sys
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
from matplotlib.pyplot import figure
figS=100
figure(num=None, figsize=(figS, 2*figS), dpi=150, facecolor='w', edgecolor='k')

#

image description

edit retag flag offensive reopen merge delete

Closed for the following reason not a real question by ortollj
close date 2020-06-18 11:06:57.469821

Comments

but after thinking about I think it is not a pb, the problem occurs because of the exagerate size of the figure. I will close this post sorry. Does anyone have an opinion on whether it's a real PB or a fake PB ?

ortollj gravatar imageortollj ( 2020-06-18 11:05:45 +0100 )edit

something I noticed on Ubuntu 18.04 , it seems that the amount of swap memory is never released once taken, and that this ultimately leads to lag.

ortollj gravatar imageortollj ( 2020-06-20 08:06:20 +0100 )edit