Disallow $offsetof / $alignof on types. Version bump.

This commit is contained in:
Christoffer Lerno
2022-10-08 12:22:13 +02:00
committed by Christoffer Lerno
parent c84f82559c
commit fa064276bc
28 changed files with 169 additions and 282 deletions

View File

@@ -1,9 +1,9 @@
module std::core::mem::allocator;
const MAX_MEMORY_ALIGNMENT = 0x1000_0000;
const DEFAULT_MEM_ALIGNMENT = $alignof(void*) * 2;
const DEFAULT_MEM_ALIGNMENT = (void*.alignof) * 2;
const DEFAULT_SIZE_PREFIX = usize.sizeof;
const DEFAULT_SIZE_PREFIX_ALIGNMENT = $alignof(usize);
const DEFAULT_SIZE_PREFIX_ALIGNMENT = usize.alignof;
const Allocator* NULL_ALLOCATOR = &_NULL_ALLOCATOR;
const Allocator* LIBC_ALLOCATOR = &_SYSTEM_ALLOCATOR;