Documentation ¶
Index ¶
- Constants
- type Allocation
- type MemDependency
- type MemoryTracker
- func (m *MemoryTracker) AddAllocation(call *Call, size uint64, arg Arg)
- func (m *MemoryTracker) AddShmRequest(call *Call, shmid uint64, size uint64)
- func (m *MemoryTracker) CreateMapping(call *Call, callidx int, arg Arg, start uint64, end uint64)
- func (m *MemoryTracker) FillOutMemory(prog *Prog) error
- func (m *MemoryTracker) FindLatestOverlappingVMA(start uint64) *VirtualMapping
- func (m *MemoryTracker) FindShmRequest(shmid uint64) *ShmRequest
- func (m *MemoryTracker) GetTotalMemoryAllocations(prog *Prog) uint64
- func (m *MemoryTracker) GetTotalVMAAllocations(prog *Prog) uint64
- func (m *MemoryTracker) Mappings(start uint64, end uint64) []*VirtualMapping
- func (m *MemoryTracker) Simplify(prog *Prog, distilled *Prog) *MemoryTracker
- func (m *MemoryTracker) TrackDependency(arg Arg, start uint64, end uint64, mapping *VirtualMapping)
- type ShmRequest
- type State
- type VirtualMapping
Constants ¶
View Source
const (
PageSize = 4 << 10
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Allocation ¶
type Allocation struct {
// contains filtered or unexported fields
}
type MemDependency ¶
type MemDependency struct { Callidx int // contains filtered or unexported fields }
Memory dependency represents the dependency of a call on a virtual memory mapping. We assume the dependency is contiguous as we will allocate pointers for arguments in a separate mmap at the beginning of the function. Moreover there are no calls which we know of that take a list of pages as arguments.
func NewMemDependency ¶
func NewMemDependency(callidx int, usedBy Arg, start uint64, end uint64) *MemDependency
type MemoryTracker ¶
type MemoryTracker struct {
// contains filtered or unexported fields
}
func NewTracker ¶
func NewTracker() *MemoryTracker
func (*MemoryTracker) AddAllocation ¶
func (m *MemoryTracker) AddAllocation(call *Call, size uint64, arg Arg)
func (*MemoryTracker) AddShmRequest ¶
func (m *MemoryTracker) AddShmRequest(call *Call, shmid uint64, size uint64)
func (*MemoryTracker) CreateMapping ¶
func (m *MemoryTracker) CreateMapping(call *Call, callidx int, arg Arg, start uint64, end uint64)
func (*MemoryTracker) FillOutMemory ¶
func (m *MemoryTracker) FillOutMemory(prog *Prog) error
func (*MemoryTracker) FindLatestOverlappingVMA ¶
func (m *MemoryTracker) FindLatestOverlappingVMA(start uint64) *VirtualMapping
func (*MemoryTracker) FindShmRequest ¶
func (m *MemoryTracker) FindShmRequest(shmid uint64) *ShmRequest
func (*MemoryTracker) GetTotalMemoryAllocations ¶
func (m *MemoryTracker) GetTotalMemoryAllocations(prog *Prog) uint64
func (*MemoryTracker) GetTotalVMAAllocations ¶
func (m *MemoryTracker) GetTotalVMAAllocations(prog *Prog) uint64
func (*MemoryTracker) Mappings ¶
func (m *MemoryTracker) Mappings(start uint64, end uint64) []*VirtualMapping
func (*MemoryTracker) Simplify ¶
func (m *MemoryTracker) Simplify(prog *Prog, distilled *Prog) *MemoryTracker
func (*MemoryTracker) TrackDependency ¶
func (m *MemoryTracker) TrackDependency(arg Arg, start uint64, end uint64, mapping *VirtualMapping)
type ShmRequest ¶
type ShmRequest struct {
// contains filtered or unexported fields
}
func (*ShmRequest) GetSize ¶
func (s *ShmRequest) GetSize() uint64
type State ¶
type VirtualMapping ¶
type VirtualMapping struct {
// contains filtered or unexported fields
}
func (*VirtualMapping) AddDependency ¶
func (vm *VirtualMapping) AddDependency(md *MemDependency)
func (*VirtualMapping) GetCall ¶
func (vm *VirtualMapping) GetCall() *Call
func (*VirtualMapping) GetCallIdx ¶
func (vm *VirtualMapping) GetCallIdx() int
func (*VirtualMapping) GetEnd ¶
func (vm *VirtualMapping) GetEnd() uint64
func (*VirtualMapping) GetStart ¶
func (vm *VirtualMapping) GetStart() uint64
func (*VirtualMapping) GetUsedBy ¶
func (vm *VirtualMapping) GetUsedBy() []*MemDependency
Click to show internal directories.
Click to hide internal directories.