MCPcopy Create free account
hub / github.com/LibertyOS-Development/kernel / alignup

Function alignup

src/allocator/mod.rs:182–185  ·  view source on GitHub ↗

This aligns the specified "address", upwards, to "align". In order to use this function, "align" must have a value that is a power of two (2).

(address: usize, align: usize)

Source from the content-addressed store, hash-verified

180
181// This aligns the specified "address", upwards, to "align". In order to use this function, "align" must have a value that is a power of two (2).
182fn alignup(address: usize, align: usize) -> usize
183{
184 (address + align - 1) & !(align - 1)
185}
186
187
188// Free memory

Callers 2

alloc_fromrgnMethod · 0.70
allocMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected