Zeke-OS / zeke

A POSIX-like OS for ARM processors.
Other
88 stars 9 forks source link

memalign doesn't necessarily align correctly #184

Closed OlliV closed 2 years ago

OlliV commented 2 years ago

One would perhaps expect that the align function would return the align size or a multiple of it but it doesn't. Something like (size + al - MOD_AL(size, al)) would be more true to that.

https://github.com/Zeke-OS/zeke/blob/0936ab04111de6ff3b5864929eee5fedc691277b/kern/libkern/memalign.c#L46