How to check the size of the memory block available to an .exe?

Phillip Russo 21 Reputation points
2023-10-07T20:34:35.43+00:00

Visual Studio 2022

Visual C++

So other than checking for bad_alloc with try catch, is there a way to look and the memory space available to an .exe and print out a value for the size of the available block of memory that the current .exe file can access?

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,571 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 82,206 Reputation points
    2023-10-08T07:22:48.9666667+00:00

    You can get infos with GlobalMemoryStatusEx

    0 comments No comments