Skip to content

Instantly share code, notes, and snippets.

@jintgeorge
Created June 17, 2017 01:10
Show Gist options
  • Save jintgeorge/ef5834cd6558c84a5c0312edc70448e0 to your computer and use it in GitHub Desktop.
Save jintgeorge/ef5834cd6558c84a5c0312edc70448e0 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <sys/resource.h>
int main(int argc, char* argv[])
{
struct rlimit limit;
getrlimit (RLIMIT_STACK, &limit);
std::cout << "Stack Limit = " << limit.rlim_cur/1024 << " Kbytes and max limit = " << limit.rlim_max/1024 << " Kbytes." << std::endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment