Skip to content

Comments

[iOS/macOS] Improve OS.get_memory_info#109112

Merged
akien-mga merged 1 commit intogodotengine:masterfrom
bruvzg:mem_stat
Dec 18, 2025
Merged

[iOS/macOS] Improve OS.get_memory_info#109112
akien-mga merged 1 commit intogodotengine:masterfrom
bruvzg:mem_stat

Conversation

@bruvzg
Copy link
Member

@bruvzg bruvzg commented Jul 30, 2025

Fixes #109073

  • Uses built-in vm_page_size instead of vm.pagesize (not available on iOS).
  • Uses more reasonable "free" value on macOS/iOS (OS usually use all available memory for caches and number of completely free pages is minimal).
  • Reads swap info only on macOS (there's no swap on iOS).

@limbonaut
Copy link
Contributor

I gave it a test and can confirm that get_memory_info() errors on IOS are gone now:

Screenshot 2025-08-02 at 11 18 07

@Repiteo Repiteo modified the milestones: 4.5, 4.6 Sep 8, 2025
@akien-mga akien-mga changed the title [iOS/macOS] Improve OS.get_memory_info [iOS/macOS] Improve OS.get_memory_info Dec 18, 2025
@akien-mga akien-mga merged commit 624d77d into godotengine:master Dec 18, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accessing OS.get_memory_info() causes runtime errors on iOS

4 participants