22 int main(
int argc,
char** argv)
29 if (nh.
getParam(
"stack_size_to_use", stack_size))
31 ROS_INFO(
"Node using stack size %i", (
int)stack_size);
32 const rlim_t max_stack_size = stack_size;
33 struct rlimit stack_limit;
34 getrlimit(RLIMIT_STACK, &stack_limit);
35 if (stack_limit.rlim_cur < stack_size)
37 stack_limit.rlim_cur = stack_size;
39 setrlimit(RLIMIT_STACK, &stack_limit);