#include <stdio.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>
#include <stdlib.h>

int main(void)
{
	struct rlimit rlim;

	if (!getrlimit(RLIMIT_STACK, &rlim)) {
		if (rlim.rlim_cur > (8 * 1024 * 1024)) {
			printf("RLIMIT_STACK is %lu MB, max is %lu MB!\n", rlim.rlim_cur / (1024 * 1024), rlim.rlim_max / (1024 * 1024));
			system("uname -a");
		}
	}
	return 0;
}
