mirror of
https://github.com/vlang/v.git
synced 2025-09-08 06:41:58 -04:00
This commit is contained in:
parent
c225e0415a
commit
67a8c81803
15
vlib/runtime/free_memory_impl_openbsd.c.v
Normal file
15
vlib/runtime/free_memory_impl_openbsd.c.v
Normal file
@ -0,0 +1,15 @@
|
||||
module runtime
|
||||
|
||||
fn free_memory_impl() usize {
|
||||
$if cross ? {
|
||||
return 1
|
||||
}
|
||||
$if !cross ? {
|
||||
$if openbsd {
|
||||
page_size := usize(C.sysconf(C._SC_PAGESIZE))
|
||||
av_phys_pages := usize(C.sysconf(C._SC_AVPHYS_PAGES))
|
||||
return page_size * av_phys_pages
|
||||
}
|
||||
}
|
||||
return 1
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user