In my Python scripts (that are periodically triggered by the Arduino side) I use and run code as-like the following:
import os
os.system curl www.website.com --output /tmp/script_file.txt
# ...
with open('/tmp/script_file.txt') as file1:
content = ... # load content
#...
file2 = open('/tmp/another_script_file.txt', 'w')
#...
My questions are:
1) Can the above code make the Linino side to reach "out of memory" / "stackoverflow" errors so that it starts to behave unespectly or even to block "a là Arduino way"?
2) Is it advisable to store the cURL response (see the '--output' option in the above code) to files in the 'tmp' directory on the Linino side?
3) What should I look for in order to avoid issues?
4) What else do you advice relating memory concerns on the Linino side?
5) What tools should I use to monitor the memory usage on the Linino side?
speaking: 1) Can the above code make the Linino side to reach "out of memory" / "stackoverflow" errors so that it starts to behave unespectly or even to block "a là Arduino way"?
I can't say for sure, but probably the answer is "sure you can use up all the ram". If you do the result will probably be a "Out of memory" kernel panic.
2) Is it advisable to store the cURL response (see the '--output' option in the above code) to files in the 'tmp' directory on the Linino side?
It is as good a place as any. Definitely better than flash. /tmp is in ram.
A sd card or thumb drive that you don't mind burning all the write cycles on may be another good place especially if you have a LOT of info to store and don't write it often.
3) What should I look for in order to avoid issues?
4) What else do you advice relating memory concerns on the Linino side?
Use as little as possible, there is only 64M. Flush unused information often. Have your scripts that store a lot of information check to see how much they are using/is available
5) What tools should I use to monitor the memory usage on the Linino side?
Linino is a version of Openwrt, Openwrt is a version of linux. The normal tools for linux are (usually) available.