Any C structure can be stored in a hash table using uthash. Just add a UT_hash_handle to the structure and choose one or more fields in your structure to act as the key. Then use these macros to store, retrieve or delete items from the hash table. #include "uthash.h" struct my_struct { int id; /* we'll use this field as the key */ char name[10]; UT_hash_handle hh; /* makes this structure hashable
hashtable: hashtable.c hashtable.h hashtable_private.h hashtable iterator: hashtable_itr.c hashtable_itr.h support files: tester.c Makefile utility files: hashtable_utility.h hashtable_utility.c email: deduce from: firstname.lastname @ cl.cam.ac.uk Christopher Clark Source code for a hash table data structure in C This code is made available under the terms of the new BSD license. If you use this
Cmockery tests are compiled into stand-alone executables and linked with the Cmockery library, the standard C library, and the module being tested. Any symbols external to the module being tested should be mocked - replaced with functions that return values determined by the test - within the test application. Even though significant differences may exist between the target execution environment o
The most recent version of this package can be found in the source tree for the Boehm-Demers-Weiser garbage collector (bdwgc) on Sourceforge. It should be possible to just extract the libatomic_ops source tree and build it independently. The versions on this site are no longer being updated. Future versions will be identified by bdwgc version numbers. That transition is currently (2008-06-01) inc
以前このサイトとブログに,何度かアラインメントに関する記事を書きました (サイト内関連ページ参照). そのせいか「アラインメント」で検索して来てくれる人が多いので, 過去の記事に加筆修正してこのページを新たに作成しました. 加筆した点は次のとおりです. アラインメントとメモリアクセス回数の関係をわかりやすくするため, (ほんの少し) 図を導入しました. 「データがアラインされていないとメモリアクセス回数が増える」 と言葉で説明しているサイトは多いのですが, 図で示しているところはまだ見たことありません. アラインされていないアドレスにデータを書き込む場合, 読み出しの場合以上にメモリアクセス回数がかかる可能性があることを追記しました. 以前は「複合データ型 (配列,構造体,共用体) のアラインメント」はほとんど自明のことだと思っていたので軽く流していましたが, 意外なことにこれを解説してい
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く