Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

#![expect(clippy::unreadable_literal)]

pub const BUFFER_SIZE: usize = 2147483648;
pub const BUFFER_SIZE: usize = 2147483632;
pub const BUFFER_ALIGN: usize = 4294967296;
6 changes: 3 additions & 3 deletions napi/parser/generated/constants.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Auto-generated code, DO NOT EDIT DIRECTLY!
// To edit this generated file you have to edit `tasks/ast_tools/src/generators/raw_transfer.rs`.

const BUFFER_SIZE = 2147483648,
const BUFFER_SIZE = 2147483632,
BUFFER_ALIGN = 4294967296,
DATA_POINTER_POS_32 = 536870910,
IS_TS_FLAG_POS = 2147483644,
DATA_POINTER_POS_32 = 536870906,
IS_TS_FLAG_POS = 2147483628,
PROGRAM_OFFSET = 0;

module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion napi/parser/generated/deserialize/js.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function deserialize(buffer, sourceTextInput, sourceLenInput) {
sourceLen = sourceLenInput;
sourceIsAscii = sourceText.length === sourceLen;

const data = deserializeRawTransferData(uint32[536870910]);
const data = deserializeRawTransferData(uint32[536870906]);

uint8 =
uint32 =
Expand Down
2 changes: 1 addition & 1 deletion napi/parser/generated/deserialize/ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function deserialize(buffer, sourceTextInput, sourceLenInput) {
sourceLen = sourceLenInput;
sourceIsAscii = sourceText.length === sourceLen;

const data = deserializeRawTransferData(uint32[536870910]);
const data = deserializeRawTransferData(uint32[536870906]);

uint8 =
uint32 =
Expand Down
2 changes: 1 addition & 1 deletion napi/parser/src/generated/raw_transfer_constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

#![expect(clippy::unreadable_literal)]

pub const BUFFER_SIZE: usize = 2147483648;
pub const BUFFER_SIZE: usize = 2147483632;
pub const BUFFER_ALIGN: usize = 4294967296;
3 changes: 2 additions & 1 deletion tasks/ast_tools/src/generators/raw_transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ use super::define_generator;

/// Size of raw transfer buffer.
/// Must be a multiple of 16.
const BUFFER_SIZE: u32 = 1 << 31; // 2 GiB
/// 16 bytes less than 2 GiB, to allow 16 bytes for `malloc` metadata (like Bumpalo does).
const BUFFER_SIZE: u32 = (1 << 31) - 16; // 2 GiB - 16 bytes
const _: () = assert!(BUFFER_SIZE % 16 == 0);
/// Alignment of raw transfer buffer.
const BUFFER_ALIGN: u64 = 1 << 32; // 4 GiB
Expand Down
Loading