summaryrefslogtreecommitdiff
path: root/runtime/ops/os/sys_info.rs
AgeCommit message (Collapse)Author
2024-11-15perf: use available system memory for v8 isolate memory limit (#26868)Bartek Iwańczuk
Instead of using the default 1.4Gb limit (which was meant for browser tabs) configure V8 to set the heap limit to the amount of memory available in the system. Closes https://github.com/denoland/deno/issues/23424 Closes https://github.com/denoland/deno/issues/26435 Closes https://github.com/denoland/deno/issues/21226
2024-09-09fix(ext/node): report freemem() on Linux in bytes (#25511)Divy Srivastava
2024-02-05fix(os): total and free memory in bytes (#22247)Divy Srivastava
2024-01-10fix: android support (#19437)cions
<!-- Before submitting a PR, please read https://deno.com/manual/contributing 1. Give the PR a descriptive title. Examples of good title: - fix(std/http): Fix race condition in server - docs(console): Update docstrings - feat(doc): Handle nested reexports Examples of bad title: - fix #7123 - update docs - fix bugs 2. Ensure there is a related issue and it is referenced in the PR text. 3. Ensure there are tests that cover the changes. 4. Ensure `cargo test` passes. 5. Ensure `./tools/format.js` passes without changing files. 6. Ensure `./tools/lint.js` passes. 7. Open as a draft PR if your work is still in progress. The CI won't run all steps, but you can add '[ci]' to a commit message to force it to. 8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label. --> --------- Signed-off-by: Matt Mastracci <matthew@mastracci.com> Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-11-30fix(ext/node): fix os.freemem (#21347)Yoshiya Hinosawa
2023-07-22feat(runtime): sys_info.rs - Use KERN_OSRELEASE on {Free,Open}BSD (#19849)VlkrS
os_release() can use the same API as apple on FreeBSD and OpenBSD. Ports for both systems contain a patch to that effect. See: https://github.com/freebsd/freebsd-ports/blob/main/www/deno/files/patch-runtime_ops_os_sys__info.rs https://cvsweb.openbsd.org/ports/lang/deno/patches/patch-runtime_ops_os_sys_info_rs?rev=1.2
2023-07-13chore: update to Rust 1.71 (#19822)Matt Mastracci
2023-06-26chore: fix typos (#19572)Martin Fischer
2023-05-10feat(compile): unstable npm and node specifier support (#19005)David Sherret
This is the initial support for npm and node specifiers in `deno compile`. The npm packages are included in the binary and read from it via a virtual file system. This also supports the `--node-modules-dir` flag, dependencies specified in a package.json, and npm binary commands (ex. `deno compile --unstable npm:cowsay`) Closes #16632
2023-01-15fix(runtime/os): use GetPerformanceInfo for swap info on Windows (#17433)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/17417 According to https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-memorystatusex , `stat.ullTotalPageFile` value is reliable only from GetPerformanceInfo() Also see https://github.com/GuillaumeGomez/sysinfo/issues/534 Co-authored-by: Nightly <dhairysrivastava5@gmail.com>
2023-01-03chore: resolve clippy errors in windows build (#17215)Geert-Jan Zwiers
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-12-28fix(node): Add op_node_unstable_os_uptime to allow for node interop (#17208)Kamil Ogórek
2022-12-27feat(unstable): Add "Deno.osUptime()" API (#17179)Kamil Ogórek
This PR adds support for `Deno.osUptime` which reports number of seconds since os was booted. It will allow us to be compatible with Node's `os.uptime` - https://nodejs.org/api/os.html#osuptime Partially based on https://docs.rs/uptime_lib/latest/src/uptime_lib/lib.rs.html
2022-11-07chore: fix windows-only clippy error (#16560)David Sherret
2022-11-04fix(runtime): fix Deno.hostname on windows (#16530)Yoshiya Hinosawa
2022-11-02chore: fix clippy warning (#16512)Bartek Iwańczuk
2022-11-02chore(runtime): remove dependency on sys-info crate (#16441)Divy Srivastava
Fixes #9862 `loadavg` | Target family | Syscall | Description | | ------------- | ------- | ----------- | | Linux | `sysinfo` | - | | Windows | - | Returns `DEFAULT_LOADAVG`. There is no concept of loadavg on Windows | | macOS, BSD | `getloadavg` | https://www.freebsd.org/cgi/man.cgi?query=getloadavg | `os_release` | Target family | Syscall | Description | | ------------- | ------- | ----------- | | Linux | `/proc/sys/kernel/osrelease` | - | | Windows | [`RtlGetVersion`](https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlgetversion) | dwMajorVersion . dwMinorVersion . dwBuildNumber | | macOS | `sysctl([CTL_KERN, KERN_OSRELEASE])` | - | `hostname` | Target family | Syscall | Description | | ------------- | ------- | ----------- | | Unix | `gethostname(sysconf(_SC_HOST_NAME_MAX))` | - | | Windows | `GetHostNameW` | - | `mem_info` | Target family | Syscall | Description | | ------------- | ------- | ----------- | | Linux | sysinfo | - | | Windows | `sysinfoapi::GlobalMemoryStatusEx` | - | | macOS | <br> <pre> sysctl([CTL_HW, HW_MEMSIZE]); <br> sysctl([CTL_VM, VM_SWAPUSAGE]); <br> host_statistics64(mach_host_self(), HOST_VM_INFO64) </pre> | - |