我正在使用 VC++ 2012。我想知道当前线程中有多少堆栈内存可用。
快速搜索指向使用 malloc.h 和 stackavail() 函数,但它在 Visual C++ 2012 中不存在。我如何以另一种方式实现这一目标?
有问题的例子是这样的:
#include "stdafx.h"
#include <iostream>
#include <malloc.h>
using namespace std;
int _tmain()
{
cout << "Available stack: " << stackavail() << std::endl;
}