I am using VC++ 2012. I would like to be able to tell how much stack memory is available in current thread.
Quick search points to using malloc.h and stackavail() function, yet its not there in Visual C++ 2012. How do I achieve this in another way?
Example in question is this:
#include "stdafx.h"
#include <iostream>
#include <malloc.h>
using namespace std;
int _tmain()
{
cout << "Available stack: " << stackavail() << std::endl;
}