diff --git a/cmd/heapview/internal/core/mmapfile.go b/cmd/heapview/internal/core/mmapfile.go index 9886d357..78445a9c 100644 --- a/cmd/heapview/internal/core/mmapfile.go +++ b/cmd/heapview/internal/core/mmapfile.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build darwin linux + package core import ( diff --git a/cmd/heapview/internal/core/mmapfile_other.go b/cmd/heapview/internal/core/mmapfile_other.go new file mode 100644 index 00000000..181f8420 --- /dev/null +++ b/cmd/heapview/internal/core/mmapfile_other.go @@ -0,0 +1,14 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !darwin,!linux + +package core + +// TODO(matloob): perhaps use the more portable golang.org/x/exp/mmap +// instead of the mmap code in mmapfile.go. + +type mmapFile struct{} + +func (m *mmapFile) Close() error { return nil }