└── README.md /README.md: -------------------------------------------------------------------------------- 1 | Links 2 | ===== 3 | What follows is a collection of links which I have found to be particularly valuable. 4 | The list is somewhat actively maintained. Enjoy! 5 | 6 | Tooling/Compilers 7 | ----------------- 8 | - [GDB to LLDB Command Map](http://lldb.llvm.org/lldb-gdb.html) 9 | - [GCC Extensions to the C Language](https://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html) 10 | - [Clang Compiler Extensions](http://clang.llvm.org/docs/LanguageExtensions.html) 11 | - [GCC Extensions to the C Language: Appendix - Linux System Programming](http://archive.oreilly.com/pub/a/linux/excerpts/9780596009588/gcc-extensions-to-the-c-language.html) 12 | 13 | Memory Management 14 | ----------------- 15 | ### Malloc Implementations 16 | - [nedmalloc](https://github.com/ned14/nedmalloc) 17 | - [tcmalloc](http://goog-perftools.sourceforge.net/doc/tcmalloc.html) 18 | - [ptmalloc](http://www.malloc.de/en/) 19 | - [jemalloc](http://www.canonware.com/jemalloc/) 20 | - [rtmalloc](http://unix.superglobalmegacorp.com/xnu/newsrc/osfmk/kern/rtmalloc.c.html) 21 | - [Phkmalloc](https://buildsecurityin.us-cert.gov/articles/knowledge/coding-practices/phkmalloc) 22 | 23 | Network Programming 24 | ------------------- 25 | ### General: 26 | - [Beej's Guide to Network Programming](http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html) 27 | - [(comp.unix.programmer) Unix-socket-faq for network programming](http://www.faqs.org/faqs/unix-faq/socket/) 28 | 29 | ### Advanced Techniques: 30 | - [The C10K Problem](http://www.kegel.com/c10k.html) - Classic paper on modern concurrency issues and IO strategies 31 | - [High-Performance Network Programming in C](http://www.linuxjournal.com/article/9815?page=0,1) - Overview of some advanced topics in network programming (gather/scatter IO, mmap'ed files, etc) 32 | - [Zero-Copy I: User Mode Perspective](http://www.linuxjournal.com/article/6345) - Excellent little breakdown on strategies to reduce copy operations in network IO 33 | - [Topics in High-Performance Messaging](https://www.informatica.com/downloads/1568_high_perf_messaging_wp/Topics-in-High-Performance-Messaging.htm) - Brief summaries on a number of important TCP/UDP network concepts 34 | - [High-Performance Network Programming Part 1](http://www.ibm.com/developerworks/aix/library/au-highperform1/) - Basic performance-related network programming techniques 35 | - [High-Performance Network Programming Part 2](http://www.ibm.com/developerworks/aix/library/au-highperform2/) - More basic performance-related network programming techniques 36 | - [The SO_REUSEPORT Socket Option](https://lwn.net/Articles/542629/) - How to allow multiple process/threads to listen on a common port without sharing a common socket 37 | - [Coping with the TCP TIME-WAIT state on busy Linux servers](http://vincent.bernat.im/en/blog/2014-tcp-time-wait-state-linux.html) - Comprehensive overview of TCP TIME_WAIT, how to know if it's an actual problem, and strategies for dealing with it appropriately when it is. 38 | 39 | ### TCP Flow Control: 40 | - [TCP_NODELAY and Small Buffer Writes](https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_MRG/1.2/html/Realtime_Tuning_Guide/sect-Realtime_Tuning_Guide-Application_Tuning_and_Deployment-TCP_NODELAY_and_Small_Buffer_Writes.html) - Information on using TCP_NODELAY to suppress automatic TCP coalescing (e.g. Nagle's algorithm) by the kernel 41 | - [TCP_CORK: More than you ever wanted to know](http://baus.net/on-tcp_cork/) - Information on using TCP_CORK to manually coalesce outgoing TCP data 42 | 43 | ### Security: 44 | - [Defenses Against TCP SYN FLooding Attacks](http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_9-4/syn_flooding_attacks.html) 45 | 46 | ### Mobile: 47 | - [Secrets of Mobile Network Performance](http://www.aosabook.org/en/posa/secrets-of-mobile-network-performance.html) 48 | - [Apple: Designing for Real-World Networks](https://developer.apple.com/library/mac/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/WhyNetworkingIsHard/WhyNetworkingIsHard.html) 49 | 50 | ### Handling SIGPIPE: 51 | - [Prevent A Process from Terminating When Writing to a Broken Pipe](http://www.microhowto.info/howto/prevent_a_process_from_terminating_when_writing_to_a_broken_pipe.html) - Various strategies for dealing with SIGPIPE 52 | - [Ignore SIGPIPE without affecting other threads in a process](http://www.microhowto.info/howto/ignore_sigpipe_without_affecting_other_threads_in_a_process.html) - How-to on thread-specific signal blocking 53 | 54 | ### TCP/IP Tuning 55 | - [Linux TCP/IP Tuning for Scalability](http://www.lognormal.com/blog/2012/09/27/linux-tcpip-tuning/) 56 | - [Enabling High Performance Data Transfers](http://www.psc.edu/index.php/networking/641-tcp-tune) 57 | - [Linux Tuning](http://fasterdata.es.net/host-tuning/linux/) 58 | - [TCP Tuning Parameters for Different OS's](http://proj.sunet.se/E2E/tcptune.html) 59 | - [Administer Linux on the Fly](http://www.ibm.com/developerworks/linux/library/l-adfly/index.html) 60 | - [IPV4 Tuning](http://www.linuxinsight.com/proc_sys_net_ipv4.html) 61 | - [Let's Make TCP Faster](http://googlecode.blogspot.com/2012/01/lets-make-tcp-faster.html) 62 | - [Speeding Up Networking - Van Jacobson Presentation](http://www.lemis.com/grog/Documentation/vj/lca06vj.pdf) 63 | 64 | ### Scalability 65 | - [Scalability Comparison of Various *nix Systems](http://bulk.fefe.de/scalability/) 66 | 67 | I/O 68 | --- 69 | 70 | ### General I/O 71 | - [libev](http://software.schmorp.de/pkg/libev.html) - High performance event-loop library 72 | - [libeio](http://software.schmorp.de/pkg/libeio.html) - Libeio is a full-featured asynchronous I/O library for C, modelled in similar style and spirit as libev 73 | 74 | ### Networking 75 | - [nanomsg](http://nanomsg.org/) - "a socket library that provides several common communication patterns. It aims to make the networking layer fast, scalable, and easy to use" 76 | 77 | Optimization 78 | ------------ 79 | - [Optimization of Computer Programs in C](http://leto.net/docs/C-optimization.php) 80 | - [The Lost Art of C Structure Packing](http://www.catb.org/esr/structure-packing/) 81 | - [Bit Twiddling Hacks](https://graphics.stanford.edu/~seander/bithacks.html) 82 | - [Fast to_lower for C](https://github.com/andrew-canaday/fast_tolower/) 83 | 84 | Concurrency 85 | ----------- 86 | ### Patterns 87 | - [Go Channels in Good old C](http://devcry.heiho.net/2012/07/go-channels-in-good-old-c.html) 88 | - [The Disruptor Pattern](http://lmax-exchange.github.io/disruptor/files/Disruptor-1.0.pdf) 89 | - [A Potted Guide to Stackless Coroutines](http://blog.think-async.com/2010/03/potted-guide-to-stackless-coroutines.html) 90 | - [Boost Proactor](http://www.boost.org/doc/libs/1_47_0/doc/html/boost_asio/overview/core/async.html) 91 | - [Introduction to Non-blocking IO](http://www.kegel.com/dkftpbench/nonblocking.html) 92 | 93 | ### Techniques 94 | - [Coroutines in C](http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html) 95 | - [Tony Finch - Coroutines in less than 20 lines of standard C](http://fanf.livejournal.com/105413.html) 96 | - [Coroutines in one page of C](http://www.embeddedrelated.com/showarticle/455.php) 97 | - [Building Coroutines](http://www.csl.mtu.edu/cs4411.ck/www/NOTES/non-local-goto/coroutine.html) 98 | 99 | ### Coroutine Libraries for C 100 | - [libwire](https://github.com/baruch/libwire) 101 | - [libconcurrency](https://code.google.com/p/libconcurrency/) 102 | - [C coroutines](https://github.com/stevedekorte/coroutine) 103 | - [libconcurrent](https://github.com/sharow/libconcurrent) 104 | - [libcoroutine](https://github.com/sos22/libcoroutine) 105 | - [libcoro](http://software.schmorp.de/pkg/libcoro.html) 106 | - [libpcl](http://www.xmailserver.org/libpcl.html) 107 | 108 | ### Green Threads Libraries for C 109 | - [State Threads](http://state-threads.sourceforge.net/) 110 | 111 | ### Fibers Libraries for C 112 | - [libevfibers](http://olkhovskiy.me/libevfibers/) 113 | - [libevfibers on github](https://github.com/Lupus/libevfibers) 114 | 115 | ### Misc 116 | - [A Gigantic List of Alternate Concurrency Libraries for C](https://github.com/baruch/libwire/wiki/Other-coroutine-libraries) 117 | 118 | C/C++ 119 | ----- 120 | - [A Guide to Undefined Behavior in C and C++: Part 1](http://blog.regehr.org/archives/213) 121 | - [A Guide to Undefined Behavior in C and C++: Part 2](http://blog.regehr.org/archives/226) 122 | - [A Guide to Undefined Behavior in C and C++: Part 3](http://blog.regehr.org/archives/232) 123 | - [What Every C Programmer Should Know about Undefined Behavior](http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html) 124 | - [The C++ Faq](http://www.parashift.com/c++-faq/) - Marshall Cline's invaluable resource for C++ programmers 125 | - [The C++ Super-Faq](https://isocpp.org/faq) - A wiki combination of Marshall Cline’s C++ FAQs and Bjarne Stroustrup’s C++ FAQ 126 | - [How to Handle OOM in C](http://eli.thegreenplace.net/2009/10/30/handling-out-of-memory-conditions-in-c) 127 | 128 | ### OOP-like Modelling in C 129 | - [SO: How Can Inheritance Be Modelled in C](http://stackoverflow.com/questions/1237266/how-can-inheritance-be-modelled-using-c) 130 | - [SO: What Techniques/Strategies do People Use for Building Objects in C](http://stackoverflow.com/questions/1225844/what-techniques-strategies-do-people-use-for-building-objects-in-c-not-c) 131 | - [Object-oriented Programming in C](http://modelingwithdata.org/arch/00000035.htm) 132 | - [Open Reusable Object Models](http://www.vpri.org/pdf/tr2006003a_objmod.pdf) 133 | - [Object Oriented Programming in C - Laurent Deniau](http://ldeniau.home.cern.ch/ldeniau/html/oopc/oopc.html) 134 | 135 | Assembly Language Programming 136 | ----------------------------- 137 | - [Linux ASM Quickstart](http://database.sarang.net/study/linux/asm/linux-asm.txt) 138 | - [GCC Inline-assembly HOWTO](http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html) 139 | 140 | Kernel 141 | ------ 142 | - [Interfacing with the Scheduler](http://www.gnu.org/software/libc/manual/html_mono/libc.html#Priority) 143 | - [Linux "Hello World" Kernel Module](http://www.tldp.org/LDP/lkmpg/2.6/html/x121.html) 144 | 145 | Misc 146 | ---- 147 | ### Websites/Blogs 148 | - [The good-looking textured light-sourced bouncy fun smart and stretchy page](http://freespace.virgin.net/hugo.elias/) - Why would you not click this? 149 | - [libecb](http://software.schmorp.de/pkg/libecb.html) - This project delivers you many gcc builtins, attributes and a number of generally useful low-level functions, such as popcount, expect, prefetch, noinline, assume, unreachable and so on 150 | - [Eli Bendersky's Website](http://eli.thegreenplace.net/) 151 | - [Doug Lea's Homepage](http://gee.cs.oswego.edu/) 152 | - [John Regehr's Blog](http://blog.regehr.org/) 153 | - [Christian Plesner Hansen](http://h14s.p5r.org/) 154 | - [The "Double Check Locking is Broken" Declaration](http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html) 155 | 156 | ### Amazing tricks you will probably never need 157 | - [Duff's Device](http://www.lysator.liu.se/c/duffs-device.html) 158 | - [Fast Inverse Square Root](http://h14s.p5r.org/2012/09/0x5f3759df.html) 159 | 160 | Standards 161 | --------- 162 | ### Internet/Networking 163 | - [IPv4](https://tools.ietf.org/html/rfc791) 164 | - [IPv6](https://tools.ietf.org/html/rfc2460) 165 | - [UDP](https://tools.ietf.org/html/rfc768) 166 | - [TCP](https://tools.ietf.org/html/rfc793) 167 | - [HTTP/1.0](https://tools.ietf.org/html/rfc1945) 168 | - [HTTP/1.1 (Original RFC)](https://tools.ietf.org/html/rfc2616) 169 | - [HTTP/1.1 Message Syntax and Routing](https://tools.ietf.org/html/rfc7230) 170 | - [HTTP/1.1 Semantics and Content](https://tools.ietf.org/html/rfc7231) 171 | - [HTTP/1.1 Conditional Requests](https://tools.ietf.org/html/rfc7232) 172 | - [HTTP/1.1 Range Requests](https://tools.ietf.org/html/rfc7233) 173 | - [HTTP/1.1 Caching](https://tools.ietf.org/html/rfc7234) 174 | - [HTTP/1.1 Authentication](https://tools.ietf.org/html/rfc7235) 175 | - [HTTP/2.0](https://tools.ietf.org/html/rfc7540) 176 | - [HPACK](https://tools.ietf.org/html/draft-ietf-httpbis-header-compression-12) 177 | - [QUIC](https://github.com/devsisters/libquic) 178 | - [RFC6455 (WebSockets)](https://tools.ietf.org/html/rfc6455) 179 | - Pre-Standard WebSockets Specs: 180 | - [hybi-10](http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10) 181 | - [hybi-7](http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07) 182 | - [hybi-00](http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-00) 183 | - [hixie-76](http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76) 184 | - [hixie-75](http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-75) 185 | - [TLS](https://tools.ietf.org/html/rfc2246) 186 | - [MQTT 3.1.1](http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html) 187 | 188 | ### Compression 189 | - [zlib](https://tools.ietf.org/html/rfc1950) 190 | - [deflate](https://tools.ietf.org/html/rfc1951) 191 | - [gzip](https://tools.ietf.org/html/rfc1952) 192 | - [sdch](http://lists.w3.org/Archives/Public/ietf-http-wg/2008JulSep/att-0441/Shared_Dictionary_Compression_over_HTTP.pdf) 193 | - [xz](http://en.wikipedia.org/wiki/Xz) 194 | - [lzma](http://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Markov_chain_algorithm) 195 | 196 | --------------------------------------------------------------------------------