I'm supposed to write a program that doesn't crash and can approximate the size of the free store (heap memory). And the hint is
Hint: Use a loop to allocate, say, 1000000 bytes at a time and add 1 to an unsigned long long counter; then when the allocation fails, print the counter times 1000000.0.
This is my first exposure to programming and c++ so I am totally lost on were to begin. Isn't the size of free store depend on the computer's ram? How could I possibly calculate the size of that large memory in bytes?
Also what is an unsigned long long?