Skip to content
academia.sh

Unit 02 of 03

Data Structures and Idioms

Linked structures and aliasing, ring buffers and queues, hash tables, object-like design with function tables, and idioms for cleaning up operating system resources from a single exit point.

Published Updated

Lessons

  1. 01 Linked Structures A C implementation of a linked list and a binary search tree; measuring how changing a node through an alias and a shallow copy produce shared visibility, while a deep copy cuts it. 13 min read
  2. 02 Ring Buffers and Queues A fixed-capacity ring buffer and a linked queue in which a value passes exactly once between a producer and a consumer; measuring, through equality, that a read value no longer stays in the buffer. 11 min read
  3. 03 Hash Tables Measuring that reading a record from a hash table with separate chaining produces its own copy, without changing the record in the table; and how colliding keys chain in the same bucket. 12 min read
  4. 04 Object-Like Design In object-like interfaces built with an opaque struct and function pointers embedded in the struct, measuring that two handles share the same object and that a method call does not change that sharing. 12 min read
  5. 05 Resource Cleanup Idioms Measuring a resource that closes without ever reaching a reader, on the failure path of a function that opens several resources in sequence. 11 min read

Start typing to search.

↑↓ ↵ Esc navigate · open · close