0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-11-28 16:21:04 -05:00

Build with v8_typed_array_max_size_in_heap=0 (#1070)

Ensure allocation of typed arrays and arraybuffers always goes through
the embedder's ArrayBufferAllocator, otherwise small buffers get moved
around by the garbage collector but embedders normally want them to have
fixed addresses.
This commit is contained in:
Ben Noordhuis 2022-09-19 00:35:30 +02:00 committed by GitHub
parent d41dc37a40
commit 5cc0a8556a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -204,6 +204,12 @@ fn build_v8() {
gn_args.push(r#"target_cpu="x86""#.to_string());
}
// Ensure allocation of typed arrays and arraybuffers always goes through
// the embedder's ArrayBufferAllocator, otherwise small buffers get moved
// around by the garbage collector but embedders normally want them to have
// fixed addresses.
gn_args.push(r#"v8_typed_array_max_size_in_heap=0"#.into());
let gn_root = env::var("CARGO_MANIFEST_DIR").unwrap();
let gn_out = maybe_gen(&gn_root, gn_args);