Struct ld_memory::MemorySection [−][src]
pub struct MemorySection { /* fields omitted */ }Implementations
Divide memory section into slots.
This can be used to divide a memory section into multiple slots of equal size, e.g., for an active / passive image scheme on MCUs.
slot starts at zero for the first slot.
Read options from environment
This will evaluate the following environment variables:
| Variable | Default |
|---|---|
LDMEMORY_OFFSET | 0 |
LDMEMORY_PAGESIZE | 1 |
LDMEMORY_NUM_SLOTS | 2 |
LDMEMORY_SLOT | None |
If an offset is given, the whole section will be offset and shortened by the given value. If a pagesize is given, the slots will start and end will be aligned at the pagesize.
If a slot number is given, the remaining section will be divided into
<prefix>_NUM_SLOTS slots, aligned to <prefix>_PAGESIZE, and the
<prefix>_SLOTth (starting at 0) will be returned.
Note: from_env_with_prefix can be used to use a different prefix than
the default prefix LDMEMORY_.
Read slot options from environment with custom prefix
See from_env().
Auto Trait Implementations
impl RefUnwindSafe for MemorySectionimpl Send for MemorySectionimpl Sync for MemorySectionimpl Unpin for MemorySectionimpl UnwindSafe for MemorySection