|There's more than one way to do things|
Perl Tk crashes when mem usage exceeds 4G on Win10by boleary (Scribe)
|on Sep 23, 2022 at 10:48 UTC||Need Help??|
boleary has asked for the wisdom of the Perl Monks concerning the following question:
I have a Perl Tk GUI application that crashes after it exceeds 4GB of RAM usage and I have no issues exceeding 4GB when running tests in a console application (without Perl Tk)
Operating system: Microsoft Windows Version 10.0.19044.2006 Perl version: v5.30.3 Tk version: 804.036 (latest available on CPAN)
Perl spits out this error almost every time it crashes, but sometimes it crashes without an error:
When searching for this error, everything I could find was multi-threading related, and our application does not use multi-threading. I thought it may be because we have something configured as 32-bit instead of 64-bit, so I followed the instructions in this question and found that everything is configured as 64-bit.
Below is an example GUI application that crashes after the memory exceeds 4GB. I have boiled this down from our application and the crashing behavior is the same. The data structure that we use is obviously much larger, so I am cloning a simplified version of ours many times to pass the 4GB threshold.
Note that this sample application does not crash when running on a Centos7 VM (only on the Win10 host)