Example #1
0
func (d *Domain) SetMemory(memory uint64) error {
	result := C.virDomainSetMemory(d.cptr, C.ulong(memory))
	if result == -1 {
		return GetLastError()
	}
	return nil
}
Example #2
0
func (d *VirDomain) SetMemory(memory uint64) error {
	result := C.virDomainSetMemory(d.ptr, C.ulong(memory))
	if result == -1 {
		return errors.New(GetLastError())
	}
	return nil
}