logoalt Hacker News

jagged-chiselyesterday at 10:47 AM1 replyview on HN

But it does keep one in the habit of using NULL checks.


Replies

david-gpuyesterday at 11:20 AM

It is pointless, because in Linux all you get is a virtual address. Physical backing is only allocated on first use.

In other words, the first time you access a "freshly allocated" non-null pointer you may get a page fault due to insufficient physical memory.

show 1 reply