Skip to documentation
SLOP

tiny.tldr.formats.elf.layout.reserve

Reference tiny.tldr formats elf layout reserve

Defined in formats.elf.layout.

API (2)

Actions

Public operations.

No direct callersNo direct callsformats.elf.layoutreserve
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Called byCallsNo direct callersformats.elf.layout.reservesizeformats.elf.layout.reservecontribution
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsformats.elf.layout.reservecontributionprivate sourcelib.tldr.src.formats.elf.layout.reservealignForwardU64formats.elf.layout.reservesize
Static calls · unresolved targets: 0 · external targets: 0.

Source: lib/tldr/src/formats/elf/layout/reserve.zig

zig
pub fn size(section_size: u64, alignment: u64, options: anytype) u64 {    if (options.incremental_mode == .off or section_size == 0) return alignForwardU64(section_size, alignment);    const proportional = (section_size * options.incremental_reserve_percent + 99) / 100;    const slack = @max(alignment, proportional);    return alignForwardU64(section_size + slack, alignment);}pub fn contribution(section_size: u64, alignment: u64, options: anytype) u64 {    if (options.incremental_mode == .off) return section_size;    return size(section_size, alignment, options);}fn alignForwardU64(value: u64, alignment: u64) u64 {    if (alignment == 0) return value;    const mask = alignment - 1;    return (value + mask) & ~mask;}

Source: lib/tldr/src/formats/elf/layout/root.zig:7

zig
pub const reserve = @import("reserve.zig");

Audit

Definitions3
Public names5
Members0
Version26.7.0
Revisiondaab053ee433