mirror of
https://github.com/denoland/rusty_v8.git
synced 2024-11-24 15:19:31 -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:
parent
d41dc37a40
commit
5cc0a8556a
1 changed files with 6 additions and 0 deletions
6
build.rs
6
build.rs
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue