Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #109790
| Path | csiph.com!news.mixmin.net!news.unit0.net!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Peter Otten <__peter__@web.de> |
| Newsgroups | comp.lang.python |
| Subject | Almost crashing computer, was Re: how to solve memory |
| Date | Fri, 10 Jun 2016 16:41:43 +0200 |
| Organization | None |
| Lines | 25 |
| Message-ID | <mailman.140.1465569713.2306.python-list@python.org> (permalink) |
| References | <4f853aa2-cc00-480b-9fd7-79b05cbd4889@googlegroups.com> <575ac991$0$1583$c3e8da3$5496439d@news.astraweb.com> <njejj9$k4o$1@ger.gmane.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="ISO-8859-1" |
| Content-Transfer-Encoding | 7Bit |
| X-Trace | news.uni-berlin.de k3ftvyA/dxGou03hwa/GfQaq8ZrjEzK0c6Np2kPqyqtw== |
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'python3': 0.05; '/dev/null': 0.09; 'path)': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'consume': 0.16; 'crashed': 0.16; 'dfs': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'received:t-ipconnect.de': 0.16; 'wrote:': 0.16; 'memory': 0.17; 'prevent': 0.20; 'machine': 0.21; '(the': 0.22; 'code,': 0.23; '(most': 0.24; 'script': 0.25; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'linux': 0.26; 'becomes': 0.30; 'computer.': 0.32; "d'aprano": 0.33; 'steven': 0.33; 'traceback': 0.33; 'file': 0.34; 'path': 0.35; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'to:addr:python.org': 0.40; 'received:de': 0.40; 'your': 0.60; 'skip:u 10': 0.61; 'subject': 0.70 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| X-Gmane-NNTP-Posting-Host | p57bd9d73.dip0.t-ipconnect.de |
| User-Agent | KNode/4.13.3 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.22 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <njejj9$k4o$1@ger.gmane.org> |
| X-Mailman-Original-References | <4f853aa2-cc00-480b-9fd7-79b05cbd4889@googlegroups.com> <575ac991$0$1583$c3e8da3$5496439d@news.astraweb.com> |
| Xref | csiph.com comp.lang.python:109790 |
Show key headers only | View raw
Steven D'Aprano wrote:
> I just ran your code, and it almost crashed my computer.
When you suspect that a script may consume a lot of memory (the subject
might have been a hint)
ulimit (bash internal)
helps you prevent that your linux machine becomes unresponsive.
$ ulimit -v 200000
$ python3 tmp2.py > /dev/null
Traceback (most recent call last):
File "tmp2.py", line 134, in <module>
mresult = DFS(b, 2, 2, mylist, path)
File "tmp2.py", line 125, in DFS
path = DFS(b, deep-1, maxx, sourceoperators, path)
File "tmp2.py", line 129, in DFS
b.append([str(i)+str(j) for i,j in zip(aaa, bbb)])
File "tmp2.py", line 129, in <listcomp>
b.append([str(i)+str(j) for i,j in zip(aaa, bbb)])
MemoryError
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
how to solve memory meInvent bbird <jobmattcon@gmail.com> - 2016-06-09 17:58 -0700
Re: how to solve memory Michael Torrie <torriem@gmail.com> - 2016-06-09 19:12 -0600
Re: how to solve memory meInvent bbird <jobmattcon@gmail.com> - 2016-06-09 21:59 -0700
Re: how to solve memory Steven D'Aprano <steve@pearwood.info> - 2016-06-11 00:07 +1000
Almost crashing computer, was Re: how to solve memory Peter Otten <__peter__@web.de> - 2016-06-10 16:41 +0200
Re: how to solve memory meInvent bbird <jobmattcon@gmail.com> - 2016-06-10 08:00 -0700
Re: how to solve memory meInvent bbird <jobmattcon@gmail.com> - 2016-06-10 08:23 -0700
Re: how to solve memory meInvent bbird <jobmattcon@gmail.com> - 2016-06-10 16:23 -0700
Re: how to solve memory John Gordon <gordon@panix.com> - 2016-06-10 14:46 +0000
Re: how to solve memory meInvent bbird <jobmattcon@gmail.com> - 2016-06-10 08:08 -0700
Re: how to solve memory John Gordon <gordon@panix.com> - 2016-06-10 16:26 +0000
Re: how to solve memory meInvent bbird <jobmattcon@gmail.com> - 2016-06-10 16:31 -0700
Re: how to solve memory MRAB <python@mrabarnett.plus.com> - 2016-06-11 01:33 +0100
Re: how to solve memory meInvent bbird <jobmattcon@gmail.com> - 2016-06-10 21:43 -0700
Re: how to solve memory meInvent bbird <jobmattcon@gmail.com> - 2016-06-10 22:18 -0700
Re: how to solve memory meInvent bbird <jobmattcon@gmail.com> - 2016-06-10 22:55 -0700
csiph-web