alignment options (for cache-alignment).
We shrink by:
1) Removing an unnecessary zone pointer.
2) Replacing gpr_mu (40 bytes when using pthread_mutex_t) with
std::atomic_flag.
We also header-inline the fastpath alloc (ie. when not doing a zone
alloc) and move the malloc() for a zone alloc outside of the mutex
critical zone, which allows us to replace the mutex with a spinlock.
We also cache-align created arenas.
This reverts commit dc1089a6d1, reversing
changes made to 31843787cc.
This change also includes - Revert "Merge pull request #17932 from soheilhy/gprpp-mutex"
This reverts commit df4b6a763d, reversing
changes made to dc1089a6d1.
Introduce RAII wrappers in the grpc::internal and grpc_core
namespaces, and use them in place of std::mutex and
std::condition_variable.
Note that, since std::mutex is also used by the public
C++ headers we cannot introduce these wrappers in grpc_core.
Also, note that in grpcpp we cannot use gRPC core and vice versa.
So we had to duplicate the code, once using core_codegen_interface
and once using direct calls.
This reduces the container size from 1.4 GB to 640 MB. 129 MB is
jessie, 489 MB jdk, and 22 MB grpc-java. When we swap from jessie to
stretch, we could swap to openjdk:8-jdk-slim-stretch which would make
the entire image 265 MB.
Python was never needed; it was added by mistake in 0589e533.
Pre-downloading gradle artifacts isn't helpful these days, because we
build on a clean machine. Git isn't needed as cp is sufficient. libapr1
has not been required by tcnative for a long time, and we even use
tcnative-boringssl-static since at least 1.0, which also doesn't need
it. The final cleanup is to remove source and downloaded artifacts when
done compiling.