MCPcopy Create free account
hub / github.com/clockwork-xyz/clockwork / realloc

Method realloc

programs/thread/src/state/thread.rs:76–90  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

74 }
75
76 fn realloc(&mut self) -> Result<()> {
77 // Realloc memory for the thread account
78 let data_len = vec![
79 8,
80 size_of::<Thread>(),
81 self.id.len(),
82 self.instructions.try_to_vec()?.len(),
83 self.trigger.try_to_vec()?.len(),
84 NEXT_INSTRUCTION_SIZE,
85 ]
86 .iter()
87 .sum();
88 self.to_account_info().realloc(data_len, false)?;
89 Ok(())
90 }
91}
92
93/// The execution context of a particular transaction thread.

Callers 5

handlerFunction · 0.80
handlerFunction · 0.80
handlerFunction · 0.80
handlerFunction · 0.80
handlerFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected