From 5e01e30a99aaa70bdb7de747285739691e811a17 Mon Sep 17 00:00:00 2001 From: lesismal Date: Sat, 11 Dec 2021 01:32:46 +0800 Subject: [PATCH] 64-aligned on 32-bit --- proto.go | 4 +++- server.go | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/proto.go b/proto.go index 3e9debd..45f12ab 100644 --- a/proto.go +++ b/proto.go @@ -99,9 +99,11 @@ var ( // Message represents an arpc Message. type Message struct { + // 64-aligned on 32-bit + ref int32 + Buffer []byte - ref int32 handler Handler values map[interface{}]interface{} } diff --git a/server.go b/server.go index 12311de..6caa3e8 100644 --- a/server.go +++ b/server.go @@ -22,6 +22,9 @@ type Server struct { CurrLoad int64 MaxLoad int64 + // 64-aligned on 32-bit + seq uint64 + Codec codec.Codec Handler Handler @@ -29,7 +32,6 @@ type Server struct { mux sync.Mutex - seq uint64 running bool chStop chan error clients map[*Client]util.Empty