This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------------------------------------------------------------- | |
XEOS: Buddy physical memory allocator | |
Total memory: 1024 MB (1073741824 B) at 0x101000000 | |
-------------------------------------------------------------------------------- | |
Memory zone 1 - Length: 639 KB | |
- Pages: 159 | |
- Buddy 0: 159 blocks of 4 KB | |
- Buddy 1: 79 blocks of 8 KB | |
- Buddy 2: 39 blocks of 16 KB | |
- Buddy 3: 19 blocks of 32 KB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN { | |
RS = "" | |
FS = "@XEOS" | |
TYPE = "" | |
NAME = "" | |
DEF = "" | |
CONTENT = "" | |
GUARD = "" | |
} | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clang -x c /dev/null -dM -E |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef OBJC_ARC | |
#define SingletonImplementation( name ) \ | |
\ | |
static name * __sharedInstance = nil; \ | |
\ | |
+ ( id )sharedInstance \ | |
{ \ | |
static dispatch_once_t token; \ | |
\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
CF::Number number = 42; | |
CF::URL url = externalURL; | |
CF::Array array; | |
/* Adds number and URL to the array */ | |
array << number << url; | |
CF::Data data | |
( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
/* First of all, we need a C array to store our dictionary keys */ | |
CFStringRef keys[ 2 ]; | |
/* | |
* Let's create the dictionary keys. First key is straightforward because | |
* of the CFSTR macro, while the second one is less... | |
*/ | |
keys[ 0 ] = CFSTR( "key-1" ); | |
keys[ 1 ] = CFStringCreateWithCString |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
struct s1 | |
{ | |
int i; | |
}; | |
struct s2 | |
{ | |
int i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* @author Jean-David Gadina | |
* @copyright (c) 2015, Jean-David Gadina - www.xs-labs.com | |
*/ | |
#include <stdio.h> | |
#include <stdbool.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include "git2.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
template< int N > | |
struct Fibonacci | |
{ | |
static constexpr int value = Fibonacci< N - 1 >::value + Fibonacci< N - 2 >::value; | |
}; | |
template<> | |
struct Fibonacci< 1 > |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <functional> | |
#include <iostream> | |
#include <objc/runtime.h> | |
#include <objc/message.h> | |
template< typename _R_, typename ... _T_ > | |
_R_ CXX_IMP( id self, SEL _cmd, _T_ ... args ) | |
{ | |
Class cls; | |
id assoc; |