[OS] Implement and expose to scripting APIs get_memory_info method instead of old get_free_static_memory.

This commit is contained in:
bruvzg
2023-04-03 11:46:29 +03:00
parent f178cad04a
commit 628f3b2f79
10 changed files with 275 additions and 4 deletions

View File

@ -295,8 +295,15 @@ Error OS::set_cwd(const String &p_cwd) {
return ERR_CANT_OPEN;
}
uint64_t OS::get_free_static_memory() const {
return Memory::get_mem_available();
Dictionary OS::get_memory_info() const {
Dictionary meminfo;
meminfo["physical"] = -1;
meminfo["free"] = -1;
meminfo["available"] = -1;
meminfo["stack"] = -1;
return meminfo;
}
void OS::yield() {