mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
worker: add stack size resource limit option
Add `stackSizeMb` to the `resourceLimit` option group. Refs: https://github.com/nodejs/node/pull/31593#issuecomment-619633820 PR-URL: https://github.com/nodejs/node/pull/33085 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
6 files changed
+61
-20
No files matched your search
+2
-1
@@ -16,6 +16,7 @@ enum ResourceLimits {
|
||||
kMaxYoungGenerationSizeMb,
|
||||
kMaxOldGenerationSizeMb,
|
||||
kCodeRangeSizeMb,
|
||||
kStackSizeMb,
|
||||
kTotalResourceLimitCount
|
||||
};
|
||||
|
||||
@@ -95,7 +96,7 @@ class Worker : public AsyncWrap {
|
||||
void UpdateResourceConstraints(v8::ResourceConstraints* constraints);
|
||||
|
||||
// Full size of the thread's stack.
|
||||
static constexpr size_t kStackSize = 4 * 1024 * 1024;
|
||||
size_t stack_size_ = 4 * 1024 * 1024;
|
||||
// Stack buffer size that is not available to the JS engine.
|
||||
static constexpr size_t kStackBufferSize = 192 * 1024;
|
||||
|
||||
|
||||
Reference in new issue
Block a user