From 2cf0659df1259b17ba6edd12f0eee662c390dad5 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 4 Sep 2017 19:52:53 +0200 Subject: sys: don't assume vma size is 8 Use explicit size for vma. This is the last use of hardcoded ptrSize in sys package. --- sys/decl.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys/decl.go') diff --git a/sys/decl.go b/sys/decl.go index 9dc6337da..fe5744648 100644 --- a/sys/decl.go +++ b/sys/decl.go @@ -7,8 +7,6 @@ import ( "fmt" ) -const ptrSize = 8 - type Call struct { ID int NR uint64 // kernel syscall number @@ -206,12 +204,13 @@ type CsumType struct { type VmaType struct { TypeCommon + TypeSize uint64 RangeBegin uint64 // in pages RangeEnd uint64 } func (t *VmaType) Size() uint64 { - return ptrSize + return t.TypeSize } func (t *VmaType) Align() uint64 { -- cgit mrf-deployment