We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc20014 commit c623979Copy full SHA for c623979
src/hyperlight_guest_bin/src/memory.rs
@@ -50,6 +50,9 @@ struct Header(Layout);
50
/// Allocates a block of memory with the given size. The memory is only guaranteed to be initialized to 0s if `zero` is true, otherwise
51
/// it may or may not be initialized.
52
///
53
+/// # Invariants
54
+/// `alignment` must be non-zero and a power of two
55
+///
56
/// # Safety
57
/// The returned pointer must be freed with `memory::free` when it is no longer needed, otherwise memory will leak.
58
unsafe fn alloc_helper(size: usize, alignment: usize, zero: bool) -> *mut c_void {
0 commit comments