栈
mingw64:栈大小大约2M
210241024 / 4 = 524288 – 52w --5e5
#include <stdio.h>
void test_stack(size_t size) {
printf("Testing stack allocation with size: %zu ints (%.2f MB)\n", size, size * sizeof(int) / (1024.0 * 1024.0));
int arr[size]; // 栈分配
for (size_t i = 0; i < size; i++) {
arr[i] = i; // 写入测试
}
printf("Stack allocation of size %zu succeeded.\n", size