Fill memeory with endless loop?

Tim Roberts timr at probo.com
Wed May 14 02:17:56 EDT 2008


globalrev <skanemupp at yahoo.se> wrote:
>
>and when the program get skiled because out of memory all this will be
>deleted from the memory?

Yes.  When a process is killed, all of the memory it was using is released.

>so there is no way that you can, by accident, fill your whole
>harddrive and make it unusable?

Of course not.  Where do you see a connection between memory and your hard
drive?

Now, you can certainly fill your hard drive by running your little infinite
loop application and storing the results in a file:
    python looper.py > saveme.txt
but I hope it is clear to you that this can't damage any of the data you
already have.

>and RAM-memory always get cleaned out when not used i guess?

It gets released so that it can be re-used.  I don't know what you mean by
"cleaned out".  Remember that most of the systems where Python runs are
virtual memory systems, so even if one application is using a couple of
gigabytes of memory, other applications are still able to run.
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-list mailing list