3 ms·
You probably want to align the memory you return as well instead of having size be an arbitrary value.
by IgorPartola 13y ago
You probably want to align the memory you return as well instead of having size be an arbitrary value.
- a-priori 13y agoYou're right, it should word-align the addresses, but I didn't want to complicate things. This was just supposed to be a 'minimum viable allocator' to shove into a kernel temporarily then move onto other more interesting things.
- gizmo686 13y agoWhat advantage does aligning it have, given that you are already satisfied with using an allocater that cannot free memory.
- ArbitraryLimits 13y agoNone on Intel chips, but on virtual any other chip you'd get SIGBUS by referencing e.g. an N-bit datum not alinged on N/8-byte boundaries.