TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The macOS Sandbox File Limit

172 pointsby goranmoominalmost 4 years ago

4 comments

josephcsiblealmost 4 years ago
There seems to be all kinds of limits in macOS that break things in weird ways they shouldn&#x27;t. For example, calling the read() or write() syscalls with a count parameter of greater than 2^31-1 will fail with EINVAL, rather than doing something sane like a partial write. (This is not excused by the sentence in POSIX &quot;If the value of nbyte is greater than {SSIZE_MAX}, the result is implementation-defined&quot;, as SSIZE_MAX is 2^63-1, not 2^31-1.) See <a href="https:&#x2F;&#x2F;gitlab.haskell.org&#x2F;ghc&#x2F;ghc&#x2F;-&#x2F;issues&#x2F;17414" rel="nofollow">https:&#x2F;&#x2F;gitlab.haskell.org&#x2F;ghc&#x2F;ghc&#x2F;-&#x2F;issues&#x2F;17414</a> for details.
评论 #28113861 未加载
评论 #28114670 未加载
saagarjhaalmost 4 years ago
This is mostly accurate, except for this bit:<p>&gt; Kernel memory is wired: The kernel has no access to virtual memory. A quarter of physical RAM is reserved for the kernel, and within that quarter, the kernel allocates a percentage for the file mapping.<p>Kernel memory is wired–which means it can&#x27;t be paged out to disk (it&#x27;s &quot;wired down&quot;). The kernel works mostly in virtual addresses as it runs in protected mode. The top portion of the virtual address space (populated by pages backed by physical memory) is dedicated to the kernel.
oefrhaalmost 4 years ago
How do other OSes’ sandbox implementations keep track of temporary authorizations to files?
评论 #28114154 未加载
avalysalmost 4 years ago
Mac OS X is now older than Mac OS “Classic” was when OS X was first released.<p>Must be a nightmare to maintain.
评论 #28113530 未加载