Skip to content

Commit

Permalink
fix: return memory usage in bytes on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-vincent committed Jan 24, 2025
1 parent e767748 commit 55685e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/bedrock/world/actor/mob.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
class Mob : public Actor {
public:
~Mob() override = 0;
void die(const ActorDamageSource &source) override;

ENDSTONE_HOOK virtual void knockback(Actor *, int, float, float, float, float, float);
virtual void spawnAnim() = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/endstone/core/platform_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ std::size_t get_thread_count()

std::size_t get_used_physical_memory()
{
return get_proc_status("VmRSS");
return get_proc_status("VmRSS") * 1024;
}

std::size_t get_total_virtual_memory()
{
return get_proc_status("VmSize");
return get_proc_status("VmSize") * 1024;
}

} // namespace endstone::detail
Expand Down

0 comments on commit 55685e9

Please sign in to comment.