Skip to content

Commit

Permalink
Increase the default stack size to 512KB
Browse files Browse the repository at this point in the history
  • Loading branch information
kateinoigakukun committed Oct 7, 2024
1 parent 5915ff5 commit a4ad494
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/WasmKit/Engine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public struct EngineConfiguration {
/// The compilation mode to use for WebAssembly modules.
public var compilationMode: CompilationMode

/// The stack size in bytes for the virtual machine interpreter. (Default: 64KB)
/// The stack size in bytes for the virtual machine interpreter. (Default: 512KB)
///
/// Note: Typically, there are three kinds of stacks in a WebAssembly execution:
/// 1. The native stack, which is used for native function calls.
Expand All @@ -92,7 +92,7 @@ public struct EngineConfiguration {
public init(threadingModel: ThreadingModel? = nil, compilationMode: CompilationMode = .lazy, stackSize: Int? = nil) {
self.threadingModel = threadingModel ?? .defaultForCurrentPlatform
self.compilationMode = compilationMode
self.stackSize = stackSize ?? (1 << 16)
self.stackSize = stackSize ?? (1 << 19)
}
}

Expand Down

0 comments on commit a4ad494

Please sign in to comment.