In OS X there is an API called KUNC (Kernel-User Notification Center)
This API is used by the kernel (typically a kext) when it wants to display notification to users or launch userland command.
Continue reading
Category Archives: Standard C
Simulate a Kernel Panic on Mac OS X
Not so far ago, I was lost on the net, and I found a piece of code to simulate a Kernel Panic in the osxbook site.
Well, and as we are Mac Users, we don’t see this kind of thing very often [TROLL]Not like on Windows[/TROLL], so I decided to share this little piece of code ![]()
Continue reading
moatool : Mach-O Archive Tool
After my post on the Universal Binaries, I present you moatool, a tiny tool to manipulate Mach-O archives.
What can it do ?
- Print the fat_section of a Mach-O file, if it’s an archive.
- Split the archive into as much part as there is architecture.
- Reduce the size of the binary by removing the useless architectures, at the end it’s a simple binary.
Continue reading
[Tip] best buffer size for read(2), write(2) in *NIX OS
I don’t know you, but when I needed to do I/O operations I often wondered what was the best buffer size to read / write bytes.
After some research I finally found, so I’ll share it with you.
Continue reading
Universal Binary : The Mach-O file format
I have been playing with Mac OS X file format for a while now. This file format is known as Mach-O, which is resulting from the Mach project on which Mac OS is based.
First a little history, When the Macs crossed from PPC to x86, Apple introduced Universal Binaries applications (UB).
The goal of an UB application is to be able to execute on different types of architecture, the major defect is that the final application is 2 times larger, but nowadays with the disks capacity it’s not really an issue.
So how they did this ? It’s very simple, an UB application is nothing more than an archive of 2 applications with a special header.
Continue reading