- Bits and Pieces: The Small BCardLayout
- Lesson 22: A First (Bigger) Project
- API Design is Hard, Finding Bugs (Can be Made) Easy!
- The Haiku Tutorial is Here!
- From Bugs back to Wireless and Friends
- Greetings (mostly) from the Kernel (Debugging Land)
- 2011 Google Code-In Contest, Haiku Selected as One of Eighteen Participating Organzations
- Virtualize a Physical Haiku Partition With Virtualbox
- BeGeistert 024 + Coding sprint report
- 2011 Google Summer of Code Mentor Summit
Lesson 7: Losing My Memory
It's hard for me to believe that I've been publishing these mostly-weekly lessons for almost a month and a half. It's been really fun. I hope that those of you reading them have been enjoying reading (and hopefully learning from) them as I have in writing them. This one covers two major topics: memory management and binary math, nothing terribly exciting, but really useful and necessary nonetheless. Learn to Program With Haiku, Lesson 7.
- darkwyrm's blog
- Login or register to post comments







Comments
Re: Lesson 7: Losing My Memory
Thanks for these tutorials, very useful. Can't wait to start diving into the Haiku API.
Re: Lesson 7: Losing My Memory
I agree! Very nice tutorials, and I am also eager to see when you arrive to the HAIKU API specific part. :)
Re: Lesson 7: Losing My Memory
The calloc() signature given is not correct. For some (probably weird) reasons it has two arguments:
http://www.opengroup.org/onlinepubs/9699919799/functions/calloc.html
Re: Lesson 7: Losing My Memory
On page 7, in the XOR example, you listed 36 as 0b00010100, instead of 0b00100100. This was confounding me when I was performing the XOR in my head and couldn't see how you got a 1 in the 16's place, and a 0 in the 32's place.
This is a great tutorial though, good job!
Re: Lesson 7: Losing My Memory
The calloc() signature given is not correct. For some (probably weird) reasons it has two arguments:
http://www.opengroup.org/onlinepubs/9699919799/functions/calloc.html
On page 7, in the XOR example, you listed 36 as 0b00010100, instead of 0b00100100. This was confounding me when I was performing the XOR in my head and couldn't see how you got a 1 in the 16's place, and a 0 in the 32's place.
This is a great tutorial though, good job!
Thanks for pointing out the errata, guys! I've made the necessary corrections and appreciate having them pointed out. :)