in reply to Re: maximum length of scalar in theory
in thread maximum length of scalar in theory
# free total used free shared buff/cache + available Mem: 3290320 1522528 1677380 152628 397604 + 1767792 Swap: 0 0 0
So, I can't really tell if my theory is right. I mean I would need a computer with 2 Exabytes of memory to see if it would work. But it seems I have more than 800 MB of free memory, yet it won't allow me to create a 1 GB string. I don't understand why it kills the process. Well, anyway, I just wanted to know what's a safe size for a string. So, it seems that if I create a program that works with 1 GB strings, it will run on most modern machines. But if I write a program that relies on creating and working with 2GB or 4GB strings, then that might fail on some systems. I guess, the bigger the string, the fewer computers will be able to handle it.
Btw I also checked the Perl machine used in this online site https://www.onlinegdb.com/online_perl_compiler, and I was able to create a 1 GB string with no problem! Yay! Now, when I tried to create a 1.5 GB string, my program just stopped working without any error message. So, I guess, they limit how much memory they allocate for anonymous users online and if a process tries to use more, it gets killed silently.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: maximum length of scalar in theory
by hippo (Archbishop) on Sep 30, 2024 at 08:41 UTC |