03-29-2022 02:32 AM - edited 03-29-2022 02:46 AM
@Yamaeda wrote:
There used to be an ini-key (config.sys?) to get access to a larger address space in 32 bit windows, do you still need to use that on a 64 bit system?
That was to increase the available memory from 2GB to 3GB. By default Windows used the upper half of the available virtual memory address space for its own system DLLs such as ntdll.dll, kernel32.dll etc, etc. This was to conserve memory space as it could load these once into an address memory space and then map that into every process, rather than loading it again and again for each process. That still costs some management infrastructure to maintain the correct process independent reference count but is a lot cheaper than loading it repeatedly into memory for every process.
The 2GB limit comes from a time when the physical memory of Windows computers was measured in Megabytes rather than Gigabytes. Only 20 years ago 256 MB of physical RAM was very common for a computer, 512 MB was considered a beast (and cost more than 32GB nowadays). 😁
So choosing it like that seemed like a VERY safe choice as it required only a one bit check to see if an address was in the special system memory address space or rather in the user space.
As available memory grew, the 2GB limit started to turn out to be a real problem and careful review showed that the Windows system could safely live in 1GB of memory, so that extra switch was introduced. And since there are always programmers out there who find ways to abuse certain features of a system, despite dire warnings to not go beyond the safe lines of documented behaviour, Microsoft decided in the name of the holy grail of backwards compatibility to make it a feature that you had to specifically enable at boot time.
With Windows 64-bit that limit doesn't exist anymore and for the SysWOW64 subsystem they sacked the compatibility mode too, since applications that abuse the system in such a way that they would stumble over that, would almost certainly stumble over a number of other compatibility issues in the SysWOW64 subsystem and it was easy to sell, that such hacky applications simply can't work on 64-bit Windows anymore.
As to the claim that 32-bit applications are allowed to use the full 4GB of memory themselves under 64-bit Windows, I heard that too but have my doubts that it applies as generally as most people would like to think. It may also be dependent on hardware such as CPU family and generation.
And in almost all cases I have seen so far, where the available 3GB limit was a problem it was really due to a bad choice of the used algorithme and/or data model to work on, usually resulting not only in huge memory consummation but also rather bad performance. With applications where 3GB of memory is a limit, an increased limit to 4GB only buys you a few minutes of extra air. Rather sooner than later the 4GB is going to blow up too, and it is simply a sign to reconsider your options rather than trying to buy you a few more gaps of air before you ultimately run out of it.
There are applications where 4GB of working memory is a legitimate problem, but much of what I have seen in the past does not fit in those categories. And if you happen to work in these categories you should have searched for ways to move to 64-bit already back in Windows 7 times.
03-29-2022 03:51 AM
While everything Rolf has listed is correct, I see the problem a little differently.
Given a 3GB limit as opposed to 3GB, memory fragmentation when using anything more than trivial amounts of data becomes a lot more problematic as there is significantly less "leeway" for new memory allocations. Especially when working with non-trivial datasets, debugging or otherwise testing code int he IDE does become tedious given that LabVIEW uses approximately 1GB of the 3 available before even starting to test. So essentially only 2GB are available in this situation, and an increase to 3GB would definitely be noticeable. We cannot disconnect the user data space from the LV data space when debugging or programming. An additional 1GB in these situations would be a big benefit. It's not always desired or feasible to continuously create an executable in order to check performance / functionality when using larger data sets. Again, I understand it does not inherently solve the problem (one could argue that switching to 64-bit also only postpones the problem instead of fixing it, albeit a more significant postponement) but it would still be a very welcome point. And if it's not feasible, if 3GB is really the limit, I'd like to know why so that I at least can be sure I'm not handicapping myself by having some stupid configuration of my development machine.
Add this issue to some significant issues I've had for years with faulty deploys to RT which requires clearing the compile cache on a regular basis, having LabVIEW using up the available RAM due to having to recompile source code (and seemingly never freeing it again), this becomes a real issue quite quickly. I'm already stopping and starting LabVIEW on a regular basis (all to get hat RAM back) that it has become muscle memory. Any step which would give me just a little more leeway when working under these conditions would be a big gain for my daily productivity.
I still think that "only buying a little time" is valid but it's a 33% increase, not 2%. I would still be interested as to why the 3GB limit is so prevalent when NI claims the opposite.
03-29-2022 09:23 AM
While there is interesting news here. Let's focus on the OP.
SO, SHOW some code that displays the problem, enclude data descriptions. AND answer the question about what version you see this in.
03-29-2022 09:27 AM
Well, as I understood it, he means the IDE. "LabVIEW".
03-29-2022 10:03 AM
@Intaris wrote:
Well, as I understood it, he means the IDE. "LabVIEW".
Yes, LabVIEW and Windows x64 with 32Gb RAM
No version information for either the IDE or the OS!
These docs suggest that level of detail might just be "IMPORTANT"
https://docs.microsoft.com/en-us/windows/win32/memory/memory-limits-for-windows-releases
https://zone.ni.com/reference/en-XX/help/371361R-01/lvdialog/miscellaneous_options/#compiler
And we will still know nothing about code complexity or the environmental ini keys.
03-30-2022 05:13 AM
The OS version which I am using is Windows 10 and LabVIEW version is 2019