+
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ Returns `Object`:
system.
* `free` Integer - The total amount of memory not being used by applications or disk
cache.
* `fileBacked` Integer _macOS_ - The amount of memory that currently has been paged out to storage.
Includes memory for file caches, network buffers, and other system services.
* `purgeable` Integer _macOS_ - The amount of memory that is marked as "purgeable". The system can reclaim it
if memory pressure increases.
* `swapTotal` Integer _Windows_ _Linux_ - The total amount of swap memory in Kilobytes available to the
system.
* `swapFree` Integer _Windows_ _Linux_ - The free amount of swap memory in Kilobytes available to the
Expand Down
5 changes: 4 additions & 1 deletion shell/common/api/electron_bindings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,11 @@ v8::Local<v8::Value> ElectronBindings::GetSystemMemoryInfo(
#endif
dict.Set("free", free);

#if BUILDFLAG(IS_MAC)
dict.Set("fileBacked", mem_info.file_backed);
dict.Set("purgeable", mem_info.purgeable);
#else
// NB: These return bogus values on macOS
#if !BUILDFLAG(IS_MAC)
dict.Set("swapTotal", mem_info.swap_total);
dict.Set("swapFree", mem_info.swap_free);
#endif
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载