Optimize aligned memory used by the runtime (#17324)

This commit is contained in:
Jack May
2021-05-19 13:43:59 -07:00
committed by GitHub
parent e7073ecab1
commit 477898f682
9 changed files with 154 additions and 14 deletions

View File

@@ -231,7 +231,7 @@ pub fn serialize_parameters_aligned(
.map_err(|_| InstructionError::InvalidArgument)?;
v.write_all(&keyed_account.try_account_ref()?.data())
.map_err(|_| InstructionError::InvalidArgument)?;
v.fill(
v.resize(
MAX_PERMITTED_DATA_INCREASE
+ (v.write_index() as *const u8).align_offset(align_of::<u128>()),
0,