Skip to content

Commit cfbc9a9

Browse files
committed
also test larger alignment
1 parent 959fc9b commit cfbc9a9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/pool/singleton.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,14 @@ mod tests {
363363

364364
let x = A::alloc().unwrap().init(Zst2);
365365
assert_eq!(0, &*x as *const Zst2 as usize % 2);
366+
367+
#[repr(align(4096))]
368+
pub struct Zst4096;
369+
370+
pool!(B: Zst4096);
371+
372+
let x = B::alloc().unwrap().init(Zst4096);
373+
assert_eq!(0, &*x as *const Zst4096 as usize % 4096);
366374
}
367375

368376
#[test]

0 commit comments

Comments
 (0)