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.
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
I would also like a way to specify a reusable buffer for this like
recv and recv_nonblock, but it is probably less important.
- 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
Like0
Like0Like0