Tags: dimilar/folly
Tags
check functions for Function ctor Summary: Examples, so that we may observe what native code the compiler emits for the `Function` constructor. Reviewed By: luciang Differential Revision: D35624590 fbshipit-source-id: 034c7b7cd86cf69bc22968bdd7e58da6c7b8e650
implicit conversion from Indestructible to reference
Summary:
For the common case of:
```lang=c++
static some_type get_singleton() {
static folly::Indestructible<some_type> instance{/*...*/};
return *instance; // before
return instance; // after
}
```
Reviewed By: Mizuchi
Differential Revision: D34395028
fbshipit-source-id: fff43075f84dfe3a3fd0e71fd3eda76787cb1444
Remove recursion from heap containers getOffsets helper function Summary: Avoid stack overflow and speed up getOffsets function, needed for performing heap container insertion. (Note: this ignores all push blocking failures!) Reviewed By: Gownta Differential Revision: D35652300 fbshipit-source-id: 8cd98f294dcfb6be8baed726083e99e2652d63ad
Add annotations to `opensource/fbcode_builder` Reviewed By: shannonzhu Differential Revision: D35512626 fbshipit-source-id: db449b0f2dadcbb1ea8917adfde65f2f890ee988
defer sync write behaviour to LogWriter Summary: A simple write+flush is a reasonable default behaviour for synchronous writes, but for some custom async implementations of log writers, we may want to avoid locking the entire queue for a full flush(). This may require different implementations, different signatures, etc. So let's defer the decision of how to do synchronous writes to the writer, with write+flush as default behaviour. Reviewed By: Gownta Differential Revision: D35060544 fbshipit-source-id: cb20eaecdccee7b390e4270ddbcd4c0ea4b7a649
Avoid recursive wrapping of reused buffers Summary: Existing reuse logic recursively wraps the tail buffers, which may result in a deep recursion on cleanup and lead to stack overflow (especially when executed on fibers). This diff adds an optimization to avoid doing this chaining and instead always clone original `IOBuf` for the purpose of ownership. Reviewed By: ot Differential Revision: D35167875 fbshipit-source-id: 824026c783f7ff19db31a06734699fd1fdea2b05
Remove Faulty Assert from JemallocHugePageAllocator Summary: This assert is just wrong, and is breaking in production. Jemalloc can ask for non-multiple-of-2MB chunks. This code is already resilient to that, AFAICT. Reviewed By: davidtgoldblatt Differential Revision: D34936556 fbshipit-source-id: e4ff49a37ce8c4ac7c378af995a58a17eb21020c
Revert D29856163: Use Huge Page Allocator in Zstd Context Pool Differential Revision: D29856163 (facebook@04c2275) Original commit changeset: 38e5f2e399c1 Original Phabricator Diff: D29856163 (facebook@04c2275) fbshipit-source-id: 172a495033b26880cc6a9fd5bd906a20cf20c66e
let coro::collectAllRange reserve its tasks vector Summary: It is tricky to get the size of an input range of unknown type. We must avoid iterating the range twice since iteration may be expensive. But we do expect the input range to work with range-for, giving us options. Effectively, if the natural iterator type of the input range is a random-access iterator, then we use that as the signal that getting the size of the input range will be free. Reviewed By: iahs Differential Revision: D34540902 fbshipit-source-id: 3ac40ab19461e4222168d9db3e241d07b1404bc4
further optimize relaxed atomic-bit-fetch-op by removing volatile Summary: The compiler does not move or remove `asm volatile` blocks even if it otherwise believes that all side-effects are unused or do not matter to surrounding instructions. But a relaxed operation ought to be subject to reordering. Reviewed By: Gownta Differential Revision: D34015943 fbshipit-source-id: 255716922faa32d95cdf9e49310db2dea1150035
PreviousNext