r/badcode • • Feb 16 '21

[deleted by user]

[removed]

29 Upvotes

77 comments sorted by

View all comments

Show parent comment

1

u/shiningmatcha Feb 21 '21

Is there a way to prevent too much memory usage? (Python would raise MemoryError when an operation runs out of memory) But can I also specify a limit on memory usage with some global configuration?

1

u/AutoModerator Feb 21 '21

It looks like this comment contains a code block delimited with triple backticks. Unfortunately reddit does not have universal support for this syntax and your comment will not render correctly on old reddit and most mobile apps.

For the benefit of people on old reddit, this link will take you to a correct rendering of the comment.

/u/shiningmatcha, it would be appreciated, but not required, if you could edit your comment to use the more compatible four space indention format. For single lines or inline code you can use single backticks.

You can find some examples in the reddit help documentation.


I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Tyulis Feb 21 '21

It uses a rather small amount of memory, as it dumps everything to a file and then reads only what it needs