All Questions
4 questions
3
votes
1
answer
197
views
Handling out of memory issues in heap
We have a CPI that uses ~4000 bytes of heap, and it executes a few times in a loop, so for a few executes the program will fail with memory allocation failed, out of memory.
The solution has been to ...
3
votes
1
answer
560
views
What is the memory usage limit on solana's programs?
What is the maximum memory that a solana program can allocate before throwing an out of memory exception, and how is it handled during the program's execution? Is this documented anywhere, like the ...
1
vote
1
answer
149
views
Is it possible to write a custom allocator at all? where do I store internal data structure?
Static writable data is not supported.
I could store it in the heap itself, only if there is some way to store a flag indicating if initialization is called.
Has this ever been done before?
This is ...
1
vote
1
answer
109
views
Allocate data on memory region
I have initilized a PDA with 10000 bytes of space and a Vector on its stored data:
#[derive(Accounts, Clone)]
pub struct CreateVectorPda<'info> {
/// CHECK: Just testing
#[account(mut)]
...