online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby, C#, VB, Perl, Swift, Prolog, Javascript, Pascal, HTML, CSS, JS Code, Compile, Run and Debug online from anywhere in world. Gabriel Staples 26 Sept. 2020 empirically_determine_max_thread_stack_size You can run this as a C OR C++ program! References: 1. 1. *******************************************************************************/ // By Bruno Haible // 24 Oct. 2009 // Source: // =============== Program for determining the default thread stack size ========= #include <alloca.h> #include <pthread.h> #include <stdio.h> void* threadfunc (void*p) { int n = 0; for (;;) { printf("Allocated %d bytes\n", n); fflush(stdout); n += 128; *((volatile char *) alloca(128)) = 0; } } int main() { pthread_t thread; pthread_create(&thread, NULL, threadfunc, NULL); for (;;) {} }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text



Program is not being debugged. Click "Debug" button to start program in debug mode.