/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

mihail.co
| | blog.oddbit.com

Overview I was recently working with someone else's C source and I wanted to add some basic error checking without mucking up the code with a bunch of if statements and calls to perror. I ended up implementing a simple must function that checks the return value of an expression, and exits with an error if the return value is less than 0. You use it like this: must(fd = open("textfile.txt", O_RDONLY)); Or:
3.4 parsecs

Travel
| |
| | gavinhoward.com

Ben Hoyt compared programming languages, and the only language without a hashmap was C. Let's see how a hashmap in C would actually do.
3.9 parsecs

Travel
| |
| | mazzo.li

Let's say that you have a program which relies on huge pages for performance. I couldn't find a resource fully explaining how to allocate huge pages at runtime, making sure that the huge page allocation was successful, so here it is.
4.4 parsecs

Travel
| |
| | gist.github.com

GitHub Gist: instantly share code, notes, and snippets.
8.4 parsecs

Travel
|