func parseAddresses(s string) (uintptr, uintptr, error) {
	toks := strings.Split(s, "-")
	if len(toks) < 2 {
		return 0, 0, fmt.Errorf("invalid address")
	}
	saddr, err := parseAddress(toks[0])
	if err != nil {
		return 0, 0, err
	}
	eaddr, err := parseAddress(toks[1])
	if err != nil {
		return 0, 0, err
	}
	return saddr, eaddr, nil
}
parseAddresses parses the start-end address
package procfs
import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
	"golang.org/x/sys/unix"
)
type ProcMapPermissions struct {
	Read bool
	Write bool
	Execute bool
	Shared bool
	Private bool
}
type ProcMap struct {
	StartAddr uintptr
	EndAddr uintptr
	Perms *ProcMapPermissions
	Offset int64
	Dev uint64
	Inode uint64
	Pathname string
}
func parseDevice(s string) (uint64, error) {
	toks := strings.Split(s, ":")
	if len(toks) < 2 {
		return 0, fmt.Errorf("unexpected number of fields")
	}
	major, err := strconv.ParseUint(toks[0], 16, 0)
	if err != nil {
		return 0, err
	}
	minor, err := strconv.ParseUint(toks[1], 16, 0)
	if err != nil {
		return 0, err
	}
	return unix.Mkdev(uint32(major), uint32(minor)), nil
}
func parseAddress(s string) (uintptr, error) {
	a, err := strconv.ParseUint(s, 16, 0)
	if err != nil {
		return 0, err
	}
	return uintptr(a), nil
}