mirror of
https://github.com/vlang/v.git
synced 2025-09-14 06:52:36 +03:00
runtime: fix cast error in free_memory implementation for OpenBSD (#24445)
This commit is contained in:
parent
031fce4361
commit
2fcad534db
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ fn free_memory_impl() usize {
|
||||||
mut uvm := C.uvmexp{0, 0}
|
mut uvm := C.uvmexp{0, 0}
|
||||||
mut len := sizeof(C.uvmexp)
|
mut len := sizeof(C.uvmexp)
|
||||||
unsafe { C.sysctl(&mib[0], mib.len, &uvm, &len, C.NULL, 0) }
|
unsafe { C.sysctl(&mib[0], mib.len, &uvm, &len, C.NULL, 0) }
|
||||||
return usize(uvm.pagesize * uvm.free)
|
return usize(uvm.pagesize) * usize(uvm.free)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 1
|
return 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue