From 92ca422088eb49c31e8b6146872548c456e56f3e Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sat, 10 Jun 2017 17:57:08 -0700 Subject: Kernel: Allow clearing request_objects to re-use buffer space Reduces the necessary allocation to max(in_handles, out_handles) rather than (in_handles + out_handles). --- src/core/hle/kernel/hle_ipc.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core/hle/kernel/hle_ipc.cpp') diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index 656405dd6..6cf1886cf 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp @@ -35,6 +35,10 @@ u32 HLERequestContext::AddOutgoingHandle(SharedPtr object) { return request_handles.size() - 1; } +void HLERequestContext::ClearIncomingObjects() { + request_handles.clear(); +} + ResultCode HLERequestContext::PopulateFromIncomingCommandBuffer(const u32_le* src_cmdbuf, Process& src_process, HandleTable& src_table) { -- cgit v1.2.3