diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-09-04 19:52:53 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-09-04 20:25:22 +0200 |
| commit | 2cf0659df1259b17ba6edd12f0eee662c390dad5 (patch) | |
| tree | 0817e3a42142ae5dc8c4ce05824235942816c229 /sys/decl.go | |
| parent | 4ee497d22e8872462ee1aad5aa96b68e27b4657e (diff) | |
sys: don't assume vma size is 8
Use explicit size for vma.
This is the last use of hardcoded ptrSize in sys package.
Diffstat (limited to 'sys/decl.go')
| -rw-r--r-- | sys/decl.go | 5 |
1 files changed, 2 insertions, 3 deletions
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 { |
