Alloc proc read buffer based on amount last read #631
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Instead of using the
suggested_size
(which is almost always 65536according to http://docs.libuv.org/en/v1.x/handle.html#data-types), use
the next power of two greater than the amount last read (which has been
added to the
SpawnInfo
struct).Passes NQP's
make m-test
and Rakudo'smake m-test m-spectest
.For https://gist.github.com/MasterDuke17/685b627a6a2749483dc5ec09c6a777a4
with only 5 iterations, compared to HEAD, heaptrack reports 654m "bytes allocated in total"
instead of 1.1g, 255m peak memory consumption instead of 387m, and
on_alloc
in"most memory allocated" using 4.4m instead of 480m.