Project

General

Profile

Actions

Feature #11263

closed

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

Added by normalperson (Eric Wong) almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
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) almost 9 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.

Actions #2

Updated by Anonymous almost 9 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]

Actions

Also available in: Atom PDF

Like0
Like0Like0