aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/msgpack_rpc/channel_defs.h
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-06-02 09:18:13 +0200
committerbfredl <bjorn.linse@gmail.com>2022-06-14 14:33:04 +0200
commit3f5c647de97a424d8a06e85b912ed46cc3ca8298 (patch)
treeee1eb2d7db29f903f86684cae28107eb2c835b7e /src/nvim/msgpack_rpc/channel_defs.h
parent7f8f8d6cb7874369c36553cd8cc500de1b572b31 (diff)
downloadrneovim-3f5c647de97a424d8a06e85b912ed46cc3ca8298.tar.gz
rneovim-3f5c647de97a424d8a06e85b912ed46cc3ca8298.tar.bz2
rneovim-3f5c647de97a424d8a06e85b912ed46cc3ca8298.zip
perf(memory): use an arena for RPC decoding
drawback: tracing memory errors with ASAN is less accurate for arena allocated memory. Therefore, to start with it is being used for Object types around serialization/deserialization exclusively. This is going to have a large impact especially when TUI is refactored as a co-prosess as all UI events will be serialized and deserialized by nvim itself.
Diffstat (limited to 'src/nvim/msgpack_rpc/channel_defs.h')
-rw-r--r--src/nvim/msgpack_rpc/channel_defs.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/msgpack_rpc/channel_defs.h b/src/nvim/msgpack_rpc/channel_defs.h
index 4dc3c7f22d..e622ebddf5 100644
--- a/src/nvim/msgpack_rpc/channel_defs.h
+++ b/src/nvim/msgpack_rpc/channel_defs.h
@@ -9,15 +9,16 @@
#include "nvim/api/private/dispatch.h"
#include "nvim/event/process.h"
#include "nvim/event/socket.h"
-#include "nvim/msgpack_rpc/unpacker.h"
#include "nvim/vim.h"
typedef struct Channel Channel;
+typedef struct Unpacker Unpacker;
typedef struct {
uint32_t request_id;
bool returned, errored;
Object result;
+ ArenaMem result_mem;
} ChannelCallFrame;
typedef struct {
@@ -26,6 +27,7 @@ typedef struct {
MsgpackRpcRequestHandler handler;
Array args;
uint32_t request_id;
+ ArenaMem used_mem;
} RequestEvent;
typedef struct {