Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by gnubison

3 years ago

Is Linux designed in such a way that less-than-page size allocations never fail? How would that work?

2 comments

gnubison

Reply

astrange  3 years ago

As long as the syscalls don't themselves fail, it's no problem until you run out of address space. At which point you should crash because you probably need to allocate to handle any reasonable errors.

  • cassepipe  3 years ago

    So is there no point to checking malloc return ?

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities