[issue43161] Taking sum of massive list comprehension results in total system crash.

2021-02-08 Thread Mark Dickinson
Mark Dickinson added the comment: > 28 bytes for the actual object Gah. I should proof-read before hitting "Submit Changes". That should say "28 bytes for each int object". -- ___ Python tracker __

[issue43161] Taking sum of massive list comprehension results in total system crash.

2021-02-08 Thread Mark Dickinson
Mark Dickinson added the comment: The list you're attempting to create needs around 41GB of RAM (28 bytes for the actual object, rounded up to 32 bytes per object for alignment reasons, plus 8 bytes for each pointer in the list). Assuming you don't have that much memory on your system, it'll

[issue43161] Taking sum of massive list comprehension results in total system crash.

2021-02-07 Thread George
George added the comment: Thanks Christian for the solutions. I am guessing that since it is my entire machine that crashes, and python is not simply killed for requesting so much memory, that this is an operating system problem. Should I submit this as a bug to the kernel project then? Geo

[issue43161] Taking sum of massive list comprehension results in total system crash.

2021-02-07 Thread Christian Heimes
Christian Heimes added the comment: You are using a list comprehension that consumes a LOT of memory very fast. The line requires more physical RAM than available on a typical user system. This causes your computer to become unresponsive to input. You can rewrite tie list comprehension as ge

[issue43161] Taking sum of massive list comprehension results in total system crash.

2021-02-07 Thread George
New submission from George : I tried running the following command in the interpreter, and without fail it will completely crash my entire computer. Python 3.8.7 (default, Jan 20 2021, 00:00:00) [GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] on linux Type "help", "copyright", "credits" or "license"