mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
runtime: cleanup free_memory comptime conditional (#18968)
This commit is contained in:
parent
5ecbfb7bf1
commit
571469a6ac
2 changed files with 11 additions and 17 deletions
|
@ -1,10 +1,7 @@
|
|||
module runtime
|
||||
|
||||
fn free_memory_impl() usize {
|
||||
$if linux {
|
||||
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
|
||||
page_size := usize(C.sysconf(C._SC_PAGESIZE))
|
||||
av_phys_pages := usize(C.sysconf(C._SC_AVPHYS_PAGES))
|
||||
return page_size * av_phys_pages
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue