Skip to content

Commit 334eba5

Browse files
Morel BérengerVReaperV
authored andcommitted
recvmsg: use malloc instead of new, reduces a tiny bit time spent there
1 parent 5b88f39 commit 334eba5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/IPC/Primitives.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ bool InternalRecvMsg(Sys::OSHandle handle, Util::Reader& reader)
340340
NaClIOVec iov[2];
341341
NaClHandle h[NACL_ABI_IMC_DESC_MAX];
342342
if (!recvBuffer) {
343-
recvBuffer.reset(new char[NACL_ABI_IMC_BYTES_MAX]);
343+
recvBuffer.reset( static_cast<char*>( malloc( NACL_ABI_IMC_BYTES_MAX ) ) );
344344
}
345345

346346
std::fill(std::begin(h), std::end(h),NACL_ABI_IMC_BYTES_MAX);

0 commit comments

Comments
 (0)