Keep isolated document extraction working on macOS
This commit is contained in:
1 parent
5b93dd67a7
commit
dd589e88ae
3 files changed
+60
No files matched your search
@@ -1,5 +1,6 @@
|
||||
use anyhow::{ensure, Result};
|
||||
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
const MEMORY_BYTES: usize = 512 * 1024 * 1024;
|
||||
|
||||
#[cfg(windows)]
|
||||
@@ -37,7 +38,10 @@ pub fn apply() -> Result<()> {
|
||||
|
||||
#[cfg(unix)]
|
||||
pub fn apply() -> Result<()> {
|
||||
// Darwin rejects finite AS/DATA limits. The parent enforces a sampled RSS
|
||||
// budget there; retain the CPU limit and bounded path-free transport here.
|
||||
for (resource, maximum) in [
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
(libc::RLIMIT_AS, MEMORY_BYTES as libc::rlim_t),
|
||||
(libc::RLIMIT_CPU, 30 as libc::rlim_t),
|
||||
] {
|
||||
|
||||
Reference in new issue
Block a user