Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/ur: use sysctl syscall to get RAM size on Mac #6468

Merged
merged 1 commit into from Mar 29, 2020

Conversation

greatroar
Copy link
Contributor

@greatroar greatroar commented Mar 28, 2020

Purpose

syncthing currently spawns a process to get the memory size on Darwin. It can instead do a single system call to get this information.

The other BSDs could probably do this too, except that the "memsize" parameter name appears to be MacOS-specific.

Testing

Trigger a usage report in the UI: Settings, Anonymous Usage Reporting, Preview.

Copy link
Member

@calmh calmh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good change!

@calmh calmh merged commit 1c47fae into syncthing:master Mar 29, 2020
@greatroar greatroar deleted the memory-size branch March 29, 2020 13:04
@calmh calmh added this to the v1.5.0 milestone Mar 30, 2020
calmh added a commit to calmh/syncthing that referenced this pull request Mar 30, 2020
* master: (63 commits)
  go.mod: Update jackpal/gateway dependency (fixes syncthing#5288) (syncthing#6469)
  lib/protocol: faster Luhn algorithm and better testing (syncthing#6475)
  lib/protocol: Remove unused channel Connection.preventSends (syncthing#6473)
  lib/weakhash: Fix speed reporting in benchmark (syncthing#6470)
  build: Simplify/correct Windows version tagging (fixes syncthing#6471) (syncthing#6472)
  lib/ur: Use sysctl syscall to get RAM size on Mac (syncthing#6468)
  lib/model: Do Revert/Override synchronously (syncthing#6460)
  lib/syncthing: Save version to db after upgrade ops are done (ref syncthing#6457) (syncthing#6458)
  cmd/ursrv: Minor heatmap tweaks
  lib/model: Remove unused func (syncthing#6456)
  cmd/ursrv: Use OpenStreetMap and Leaflet for heat map (ref syncthing#6150) (syncthing#6454)
  cmd/ursrv: Provide cached locations.json
  authors: Fixup keevBush
  gui, man, authors: Update docs, translations, and contributors
  go.mod: Update quic-go to 0.14.4 (syncthing#6453)
  all: Pass db intervals as args not env vars (syncthing#6448)
  lib/api: Set ServerName on LDAPS connections (fixes syncthing#6450) (syncthing#6451)
  lib/model: Unset local flag on deleted files (fixes syncthing#6436) (syncthing#6449)
  gui: Improve unused device status (fixes syncthing#6416) (syncthing#6445)
  gui, lib/model: Fix for folder stats with r-o and ignoreDel (fixes syncthing#6430) (syncthing#6431)
  ...
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Mar 30, 2021
@syncthing syncthing locked and limited conversation to collaborators Mar 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants