I'm using C++ to write a .XLL plugin for Microsoft Excel, with the help of XLW library. My operating system is windows 7 64-bit version, with 32 GB RAM; but my Excel is Excel 2010, 32-bits version.
Checking with GlobalMemoryStatusEx, it shows that the code in XLL can only see about 1200 MB virtual memory available (from ullAvailVirtual
in struct _MEMORYSTATUSEX), though the physical memory available (ullAvailPhys
) is around 23 GB.
As my code requires quite a lot memory (about 100MB per computation thread), after issuing 12 threads it hits the bad allocation error.
Is there a way to increase the memory available?
- Is this a limitation of Excel
XLL
plugin? In a Console Application,GlobalMemoryStatusEx
reports around 2034 MB Virtual Memory available. - Is this a limitation of
XLW library
? - Is this a limitation of
32-bit Excel
?