Merge "Increase Zygote command buffer size to 32k." am: ef1cd8a1ca

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2009575

Change-Id: Ic2f9475d8cf8b5d087ddbceedcc73c61982f13ce
This commit is contained in:
Hans Boehm
2022-03-07 17:25:45 +00:00
committed by Automerger Merge Worker

View File

@@ -45,7 +45,7 @@ using android::zygote::ZygoteFailure;
// WARNING: Knows a little about the wire protocol used to communicate with Zygote. // WARNING: Knows a little about the wire protocol used to communicate with Zygote.
// TODO: Fix error handling. // TODO: Fix error handling.
constexpr size_t MAX_COMMAND_BYTES = 12200; constexpr size_t MAX_COMMAND_BYTES = 32768;
constexpr size_t NICE_NAME_BYTES = 50; constexpr size_t NICE_NAME_BYTES = 50;
// A buffer optionally bundled with a file descriptor from which we can fill it. // A buffer optionally bundled with a file descriptor from which we can fill it.
@@ -273,8 +273,6 @@ class NativeCommandBuffer {
char mBuffer[MAX_COMMAND_BYTES]; char mBuffer[MAX_COMMAND_BYTES];
}; };
static_assert(sizeof(NativeCommandBuffer) < 3 * 4096);
static int buffersAllocd(0); static int buffersAllocd(0);
// Get a new NativeCommandBuffer. Can only be called once between freeNativeBuffer calls, // Get a new NativeCommandBuffer. Can only be called once between freeNativeBuffer calls,