Menu

- Learn
- Documentation
  - Language Reference
  - Library Reference
  - Command-line Reference
  - Feature Overview
  - Articles
- Downloads
- Packages
- Community
  - Blog
  - Orgs using D
  - Twitter
  - Forums
  - IRC
  - Community Discord
  - Wiki
  - GitHub
  - Issues
  - Get involved
  - Contributors
  - Foundation
  - Security Team
  - Donate
  - Sponsors
- Resources
  - Tour
  - Books
  - Tutorials
  - Tools
  - Editors
  - IDEs
  - run.dlang.io
  - Visual D
  - Acknowledgments
  - D Style
  - Glossary
  - Sitemap

Search
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

# core.internal.gc.os

Contains OS-level routines needed by the garbage collector.
License:
Boost License 1.0.
Authors:
Walter Bright, David Friedman, Sean Kelly, Leandro Lucarella

enum `ChildStatus`: int;
  Possible results for the wait_pid() function.
  `done`
    The process has finished successfully
  `running`
    The process is still running
  `error`
    There was an error waiting for the process
nothrow @nogc ChildStatus `wait_pid`(pid_t `pid`, bool `block` = true);
  Wait for a process with PID pid to finish.
  If block is false, this function will not block, and return ChildStatus.running if the process is still running. Otherwise it will return always ChildStatus.done (unless there is an error, in which case ChildStatus.error is returned).
nothrow @nogc bool `isLowOnMem`(size_t `mapped`);
  Check for any kind of memory pressure.
  Parameters:

  size_t `mapped` | the amount of memory mapped by the GC in bytes

  Returns:
  true if memory is scarce
nothrow @nogc ulong `os_physical_mem`();
  Get the size of available physical memory
  Returns:
  size of installed physical RAM

Copyright © 1999-2023 by the D Language Foundation | Page generated by Ddoc on Sat Apr 1 13:09:58 2023