mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-18 23:22:24 +01:00
23 lines
713 B
Diff
23 lines
713 B
Diff
--- mongodb-src-r3.2.1.orig/src/mongo/platform/stack_locator_pthread_getattr_np.cpp
|
|
+++ mongodb-src-r3.2.1/src/mongo/platform/stack_locator_pthread_getattr_np.cpp
|
|
@@ -31,6 +31,7 @@
|
|
#include "mongo/platform/stack_locator.h"
|
|
|
|
#include <pthread.h>
|
|
+#include <sys/resource.h>
|
|
|
|
#include "mongo/util/assert_util.h"
|
|
#include "mongo/util/scopeguard.h"
|
|
@@ -52,6 +53,11 @@
|
|
invariant(result == 0);
|
|
invariant(base != nullptr);
|
|
invariant(size != 0);
|
|
+
|
|
+ struct rlimit rl;
|
|
+
|
|
+ invariant(getrlimit(RLIMIT_STACK, &rl) == 0);
|
|
+ size = rl.rlim_cur ? : 2 * 1024 * 1024;
|
|
|
|
// TODO: Assumes a downward growing stack. Note here that
|
|
// getstack returns the stack *base*, being the bottom of the
|