Questions tagged [memory]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
86 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 ...
Whiteseal's user avatar
  • 2,893
2 votes
2 answers
236 views

How can an account ever allocate 10mb if the heap size is only 32kb?

I've an account like this: #[account] #[derive(Default, InitSpace)] pub struct Blacklist { pub access_controller: Pubkey, #[max_len(318)] // that touches realloc limit 10KB ...
Sarfaraz Nawaz's user avatar
3 votes
1 answer
371 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 ...
0xGhohun's user avatar
3 votes
0 answers
121 views

msg! macro throws out of memory [closed]

I would like to log the initializer_key field (which is a Pubkey) msg!("{}", ctx.accounts.escrow_account.initializer_key.clone()); and I got the following error Transaction simulation ...
Eren Yagdiran's user avatar
1 vote
1 answer
88 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 ...
oxfeeefeee's user avatar
4 votes
2 answers
192 views

is that all data on Solana store on memory?

I am just very confused at this point. If all data on Solana are stored in Memory what if the whole network shutdown or restarts whether all data is removed? I thought it must stored data in Hardware ...
Dũng Đàm's user avatar
1 vote
1 answer
150 views

Cannot allocate memory error

I'm running a container based on the official solana image. Dockerfile: ARG SOLANA_VERSION=v1.11.3 FROM solanalabs/solana:${SOLANA_VERSION} COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint....
Adil Idrissov's user avatar
1 vote
1 answer
94 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)] ...
user3688985's user avatar