Skip to content

Commit fe6a9e6

Browse files
committed
fixup! Add Fiber::Stack#size
1 parent 2ade29a commit fe6a9e6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/fiber/stack.cr

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ class Fiber
77
getter? reusable : Bool
88

99
def initialize(@pointer : Void*, @bottom : Void*, *, @reusable = false)
10-
{% if flag?(:unix) %}
11-
LibC.dprintf 2, "DEBUG: Fiber::Stack.new(%p, %p, %s)\n", @pointer, @bottom, @reusable ? "true" : "false"
12-
{% end %}
13-
@size = (@bottom - @pointer).to_i32
10+
# NOTE: sometimes gc/boehm reports weird stacks on linux (over 2GB)
11+
@size = (@bottom - @pointer).to_i32!
1412
end
1513

1614
def initialize(@pointer : Void*, @size : Int32, *, @reusable = false)

0 commit comments

Comments
 (0)