hypersolana/sdk/sbf/c/inc/sol/constants.h
bji 6dc7cd0845
Fixed warnings caused by redefined macros. Also fixed sol_memcpy to … (#28378)
Fixed warnings caused by redefined macros.  Also fixed sol_memcpy to have
the same signature as memcpy.
2022-11-20 03:42:17 +00:00

19 lines
801 B
C

#pragma once
/**
* @brief Solana constants
*/
/**
* The Solana runtime provides a memory region that is available to programs at
* a fixed virtual address and length. The builtin functions `sol_calloc` and
* `sol_free` call into the Solana runtime to allocate from this memory region
* for heap operations. Because the memory region is directly available to
* programs another option is a program can implement their own heap directly on
* top of that region. If a program chooses to implement their own heap they
* should not call the builtin heap functions because they will conflict.
* `HEAP_START_ADDRESS` and `HEAP_LENGTH` specify the memory region's start
* virtual address and length.
*/
#define HEAP_START_ADDRESS (uint64_t)0x300000000
#define HEAP_LENGTH (uint64_t)(32 * 1024)