Skip to content

Commit

Permalink
Let memory stat functions return uint64_t
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomShaper committed Jan 30, 2019
1 parent c21ca98 commit 496d8f1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions core/bind/core_bind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -592,17 +592,17 @@ struct Time {
};
*/

int _OS::get_static_memory_usage() const {
uint64_t _OS::get_static_memory_usage() const {

return OS::get_singleton()->get_static_memory_usage();
}

int _OS::get_static_memory_peak_usage() const {
uint64_t _OS::get_static_memory_peak_usage() const {

return OS::get_singleton()->get_static_memory_peak_usage();
}

int _OS::get_dynamic_memory_usage() const {
uint64_t _OS::get_dynamic_memory_usage() const {

return OS::get_singleton()->get_dynamic_memory_usage();
}
Expand Down
6 changes: 3 additions & 3 deletions core/bind/core_bind.h
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,9 @@ class _OS : public Object {
uint64_t get_system_time_secs() const;
uint64_t get_system_time_msecs() const;

int get_static_memory_usage() const;
int get_static_memory_peak_usage() const;
int get_dynamic_memory_usage() const;
uint64_t get_static_memory_usage() const;
uint64_t get_static_memory_peak_usage() const;
uint64_t get_dynamic_memory_usage() const;

void delay_usec(uint32_t p_usec) const;
void delay_msec(uint32_t p_msec) const;
Expand Down
8 changes: 4 additions & 4 deletions core/os/os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,16 +393,16 @@ Error OS::dialog_input_text(String p_title, String p_description, String p_parti
return OK;
};

int OS::get_static_memory_usage() const {
uint64_t OS::get_static_memory_usage() const {

return Memory::get_mem_usage();
}
int OS::get_dynamic_memory_usage() const {
uint64_t OS::get_dynamic_memory_usage() const {

return MemoryPool::total_memory;
}

int OS::get_static_memory_peak_usage() const {
uint64_t OS::get_static_memory_peak_usage() const {

return Memory::get_mem_max_usage();
}
Expand All @@ -418,7 +418,7 @@ bool OS::has_touchscreen_ui_hint() const {
return Input::get_singleton() && Input::get_singleton()->is_emulating_touch_from_mouse();
}

int OS::get_free_static_memory() const {
uint64_t OS::get_free_static_memory() const {

return Memory::get_mem_available();
}
Expand Down
8 changes: 4 additions & 4 deletions core/os/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,10 @@ class OS {
virtual void print_resources_in_use(bool p_short = false);
virtual void print_all_resources(String p_to_file = "");

virtual int get_static_memory_usage() const;
virtual int get_static_memory_peak_usage() const;
virtual int get_dynamic_memory_usage() const;
virtual int get_free_static_memory() const;
virtual uint64_t get_static_memory_usage() const;
virtual uint64_t get_static_memory_peak_usage() const;
virtual uint64_t get_dynamic_memory_usage() const;
virtual uint64_t get_free_static_memory() const;

RenderThreadMode get_render_thread_mode() const { return _render_thread_mode; }

Expand Down

0 comments on commit 496d8f1

Please sign in to comment.