Hello there,
You can use the GlobalMemoryStatusEx function to determine how much memory your application can allocate without severely impacting other applications.
The information returned by the GlobalMemoryStatusEx function is volatile. There is no guarantee that two sequential calls to this function will return the same information.
The ullAvailPhys member of the MEMORYSTATUSEX structure at lpBuffer includes memory for all NUMA nodes.
https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-globalmemorystatusex
Hope this resolves your Query !!
--If the reply is helpful, please Upvote and Accept it as an answer–