Project

General

Profile

Feature #11263

[PATCH] ext/socket/ancdata.c (bsock_recvmsg_internal): reduce stack use

Added by normalperson (Eric Wong) about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
[ruby-core:69595]

Description

Using 8K stack is probably too much. As reference, ALLOCV falls
back to heap allocation at a mere 1K. Since
bsock_recvmsg_internal is a function which will always allocate
and can trigger GC, it is in our best interest to minimize
stack usage to avoid scanning 8K of stack on GC.


Files

Updated by normalperson (Eric Wong) about 5 years ago

I would also like a way to specify a reusable buffer for this like
recv and recv_nonblock, but it is probably less important.

#2

Updated by Anonymous about 5 years ago

  • Status changed from Open to Closed

Applied in changeset r51003.


ext/socket/ancdata.c (bsock_recvmsg_internal): reduce stack use

Using 8K stack is probably too much. As reference, ALLOCV falls
back to heap allocation at a mere 1K. Since
bsock_recvmsg_internal is a function which will always allocate
and can trigger GC, it is in our best interest to minimize
stack usage to avoid scanning 8K of stack on GC.

[ruby-core:69595] [Feature #11263]

Also available in: Atom PDF