mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
Revert "runtime: cleanup free_memory comptime conditional (#18968)"
This reverts commit 571469a6ac.
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
module runtime
|
||||
|
||||
fn free_memory_impl() usize {
|
||||
page_size := usize(C.sysconf(C._SC_PAGESIZE))
|
||||
av_phys_pages := usize(C.sysconf(C._SC_AVPHYS_PAGES))
|
||||
return page_size * av_phys_pages
|
||||
$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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user