Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
IgorPartola
on Dec 4, 2013
|
parent
|
context
|
favorite
| on:
On programming without malloc
You probably want to align the memory you return as well instead of having size be an arbitrary value.
a-priori
on Dec 5, 2013
|
next
[–]
You'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
on Dec 4, 2013
|
prev
[–]
What advantage does aligning it have, given that you are already satisfied with using an allocater that cannot free memory.
ArbitraryLimits
on Dec 5, 2013
|
parent
[–]
None 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.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: