diff --git a/core/sys/info/platform_linux.odin b/core/sys/info/platform_linux.odin index 5901abd67..ed476a9cd 100644 --- a/core/sys/info/platform_linux.odin +++ b/core/sys/info/platform_linux.odin @@ -80,7 +80,10 @@ _os_version :: proc (allocator: runtime.Allocator, loc := #caller_location) -> ( } @(private) -_ram_stats :: proc() -> (total_ram, free_ram, total_swap, free_swap: i64, ok: bool) { +_ram_stats :: proc "contextless" () -> (total_ram, free_ram, total_swap, free_swap: i64, ok: bool) { + // This is here for some of the strings procedures + context = runtime.default_context() + // The approach is to read /proc/meminfo for the memory information. We do this over // reading sysinfo() since sysinfo() only returns MemFree, which is based on the amount // of free pages. The value we actually want is MemAvailable inside meminfo since it is diff --git a/core/sys/info/sysinfo.odin b/core/sys/info/sysinfo.odin index 5be40a3a8..ad120b264 100644 --- a/core/sys/info/sysinfo.odin +++ b/core/sys/info/sysinfo.odin @@ -59,7 +59,7 @@ Returns: - free_swap: Free SWAP reported by the operating system, in bytes - ok: `true` when we could retrieve RAM statistics, `false` otherwise */ -ram_stats :: proc() -> (total_ram, free_ram, total_swap, free_swap: i64, ok: bool) { +ram_stats :: proc "contextless" () -> (total_ram, free_ram, total_swap, free_swap: i64, ok: bool) { return _ram_stats() }