pub fn realloc_checked(
account: &AccountView,
new_len: usize,
payer: Option<&AccountView>,
) -> ProgramResultExpand description
Checked realloc that also ensures the account remains rent-exempt after resizing.
This is the safe version of account.resize() – it verifies that
the account has enough lamports to cover rent at the new data length.