Jargon

Tech words, plain meanings. Click a letter, or scroll.

A

Alignment

A rule: a value of size N should live at an address divisible by N. CPUs load aligned data in one step; unaligned data costs extra reads or traps.

Think of parking spots painted for specific car sizes. A sedan fits cleanly in a sedan-sized spot. Park a truck across two spots and you’ve blocked traffic.

aligned:                      misaligned:
│────│────│────│              │────│────│────│
0    8    16                   0    4    12
     ▲                              ▲
 fits in 1 spot               straddles 2 — slow

Compilers insert padding between struct fields so every field lands on its proper boundary.

Used in:

Amortized

The per-operation cost when averaged across many operations, even if one of them occasionally pays a big bill.

Monthly rent is cheap. Once a year the boiler dies and it’s expensive. Amortized is the per-month cost once you spread the boiler bill back across the year.

A hash table insert is O(1) most of the time. Once in a while, it triggers a full rehash costing O(n). Spread across all the cheap inserts that came before, the average is still O(1). That’s “amortized O(1).”

Different from “average case”. Amortized is a worst-case guarantee on a sequence of operations, not a probabilistic claim about one.

Used in:

B

Bucket

One slot in a hash table's array. Holds the chain of entries whose keys all hashed to this index.

Think of the mail slots at a hotel. Each room has one, but the staff might drop several letters in the same slot if several guests share a name. The slot itself is a bucket; the letters inside form a chain.

buckets[3] ─→ ┌─────┐     ┌─────┐
              │ key │ ──→ │ key │ ──→ NULL
              └─────┘     └─────┘

More buckets than entries → most buckets empty, lookups fast. Fewer buckets than entries → long chains, lookups drag.

Used in:

C

calloc

Like malloc, but zeros the memory before returning it. Takes (count, size) instead of total bytes.

malloc(16) gives you 16 bytes of garbage. calloc(4, 4) gives you 16 bytes of zeros. Same size, different starting state.

malloc(16)           calloc(4, 4)
┌─────────────┐      ┌─────────────┐
│ ???garbage? │      │ 0 0 0 0 0 … │
└─────────────┘      └─────────────┘

Useful for pointer arrays where you want every slot to start as NULL, or large buffers you’d otherwise have to memset yourself.

Used in:

Chaining

Collision strategy. Each bucket holds a linked list of every entry that hashed to it.

When two keys collide, chaining strings them up in the same bucket and walks the chain on lookup.

buckets[2] ─→ [ "apple" | 3 ] ─→ [ "ant" | 1 ] ─→ NULL

Simple, forgiving of mediocre hash functions, but spends memory on every next pointer. The other common strategy is open addressing, which keeps entries inside the bucket array itself.

Used in:

Collision

When two different keys hash to the same bucket. Not an error. Every hash table has to handle it.

Two different strings, same hash slot. Like two different people with different last names sharing a mailbox on a shared apartment line. The postbox doesn’t care. It just delivers both.

A good hash spreads keys evenly, so collisions are rare. A bad hash piles everything into a few slots and turns O(1) lookups into a linear walk.

Two main strategies for dealing with collisions: chaining (each bucket is a linked list) and open addressing (probe the next slot).

Used in:

D

Dangling Pointer

A pointer that still holds the address of memory that's already been freed.

Like a business card for a shop that closed. The address is real, but nothing useful is there anymore. Dereference it and you get a use-after-free.

Defensive move: set the pointer to NULL right after free, so a later mistake crashes loudly instead of silently reading garbage.

Used in:

Double Free

Calling free on the same pointer twice. Corrupts the allocator's bookkeeping.

Like returning a rented car twice. The rental company’s records break. The next customer ends up “renting” a car already handed to someone else.

Usually crashes somewhere far away from the actual bug, which is what makes it painful to track down.

Used in:

E

Endianness

The order a CPU stores the bytes of a multi-byte number. Little-endian writes the smallest byte first; big-endian the largest.

Picture writing the number 305,419,896 as 12 34 56 78 or 78 56 34 12. Same number, opposite byte order in memory.

little-endian (x86, ARM64 usual):   78 56 34 12
big-endian    (network order):       12 34 56 78

Almost every CPU you’ll meet is little-endian. Network protocols insist on big-endian, which is why htonl and ntohl exist.

Used in:

F

G

Garbage Collector

A background cleaner that frees memory you forgot about. Most modern languages ship one.

Like a hotel housekeeper: you leave your room, they tidy it, the room is ready for the next guest. Java, Go, Python, JavaScript, C# all run one while your program executes.

Trade-off: convenience vs. tiny unpredictable pauses while the cleaner works.

your code        GC
  │              │
  ▼              ▼
allocate      look around,
  …           sweep what's
  …           nobody using
Used in:

H

Hash Table

An array of buckets indexed by a hash of the key. Average O(1) lookup, if the hash is decent and the table isn't too full.

Like a coat-check with numbered hooks. You hand over a coat (key), a machine spits out a hook number (hash), you hang it there (bucket). Two coats end up on the same hook? Chain them.

key ─→ hash ─→ index ─→ buckets[index]
                         └─→ [key|val] → [key|val] → NULL

The dict, the map, the object in every language. Almost always this underneath.

Used in:

Heap

A big free space. Ask for memory, use it, give it back.

Not a pile — a warehouse. You request a spot, you get a key. Forget to return the key, the space is lost forever.

  malloc ──> [ . . . . ]   got a slot
                  │
                  ▼
              use it
                  │
                  ▼
  free   ──> [         ]   returned
Used in:

L

Linked List

A chain of nodes. Each node holds a value and a pointer to the next. The last points at nothing.

Like a scavenger hunt: each clue tells you where to find the next clue. Lose one, and you lose everything after it.

head
 │
 ▼
┌────┐     ┌────┐     ┌────┐
│ 10 │──→  │ 20 │──→  │ 30 │──→ NULL
└────┘     └────┘     └────┘

Cheap to insert at the head. Expensive to jump to the middle — you have to walk from the start.

Used in:

Load Factor

size / capacity. How full a hash table is. Above ~0.75 and lookups start to drag.

A gym with 100 lockers and 50 members is fine. 100 lockers, 90 members. Now everyone’s waiting for the same row. The load factor tells you when to build a bigger gym.

load_factor = entries / buckets

0.25 → lots of empty buckets, great lookup speed
0.75 → the usual resize trigger
1.50 → chains 1–2 long on average; lookups crawl

When it crosses the threshold, the table grows and everything is rehashed into the bigger array.

Used in:

M

malloc

Ask the system for a chunk of memory. You get back a pointer — keep it safe, you'll need it to give the memory back.

Short for “memory allocate.” Like renting a storage unit: you tell the warehouse how many square feet, they hand you a key. Lose the key, the space is lost forever.

malloc(16)  ──>  [ . . . . . . ]   16 bytes, all yours
                  ▲
                  key (pointer)
Used in:

Memory Leak

Memory you asked for but never gave back. Enough leaks and the program runs out.

Like renting storage units and losing the keys one by one. The warehouse stays full, you can’t reach any of it, and eventually there’s nowhere to put new stuff.

Short programs get away with it. Servers that run for months don’t.

Used in:

N

Node

One element of a linked structure — a list, tree, or graph. Holds a value plus pointers to its neighbours.

The basic building block. In a linked list, a node carries one value and one next pointer. In a tree, two pointers (left and right). In a graph, any number.

┌───────┐
│ value │     what it holds
├───────┤
│ next ─┼──→  where to go from here
└───────┘
Used in:

NULL

The address zero. C's way of saying 'this pointer points at nothing'.

Like writing “N/A” on a form. It marks a pointer as empty on purpose, so you can tell “not set yet” apart from “points at junk.”

Dereferencing a NULL pointer — trying to read what’s at address zero — crashes the program on every real operating system. That crash is called a segfault.

Used in:

O

Open Addressing

Collision strategy. Entries live inside the bucket array itself. When a slot is full, probe the next slot.

The opposite of chaining. No linked lists, just one big array. If the slot for your key is taken by someone else, walk forward until you find an empty one (linear probing) or jump in a pattern (quadratic probing, double hashing).

want to place "ant" at index 3
buckets:  [ . . . [apple] [ . ] . . . ]
index:     0 1 2    3       4   5 6 7

index 3 taken → try 4 → empty → place "ant" there

Better cache behaviour than chaining, trickier deletion (you can’t just blank a slot, you’d break the probe chain). Python’s dict uses it.

Used in:

Ownership

Rust's memory model. Every value has exactly one owner. When the owner goes out of scope, the value is freed.

The compiler tracks who holds what at compile time and refuses to build if the rules are broken. No garbage collector needed, no manual free, no use-after-free — the code simply won’t compile.

Trade-off: steeper learning curve (the “borrow checker” gets in your way until you internalise it), zero runtime cost once it does.

Used in:

P

Pointer

An address. Tells you where a value lives, not the value itself.

Think of it as a house number. The number isn’t the house — it just tells you where to find it.

x ──> [ 42 ]
      0x1a2b

x holds the address.
0x1a2b is where 42 actually lives.
Used in:

R

Reference Counting

Each object tracks how many pointers reference it. Count hits zero → free.

Like a library tracking how many people have borrowed a book. When the last copy comes back, the book goes to storage.

Used by Python (CPython), Swift, Objective-C. Weakness: two objects pointing at each other trap each other’s counts above zero forever (a “cycle”), so these runtimes usually bolt on a small cycle detector.

Used in:

Rehash

Recompute every entry's bucket index after a table grows. You can't memcpy. The indices change with the capacity.

hash(key) % 16 and hash(key) % 32 are almost always different buckets. When the array grows, every entry has to be placed again in its new home.

old capacity 8:                  new capacity 16:
buckets[3] → "apple"    ──→      buckets[11] → "apple"
                                 (index changes because capacity changed)

Expensive. O(n). But you only pay it when the table crosses the load factor threshold, so averaged across all inserts, each insert is still O(1). See amortized.

S

Segfault

Segmentation fault. The OS kills your program for touching memory it shouldn't.

Every program gets a set of regions it’s allowed to read and write. Step outside — dereferencing NULL, reading a freed chunk the OS has reclaimed, running off the end of an array — and the OS pulls the plug.

your program  →  reads 0x0
                     │
                     ▼
               OS: "nope"  →  CRASH

The first sign something is deeply wrong.

Used in:

Stack

A pile. Last one on is the first one off.

Like stacking plates. You can’t grab the bottom plate without lifting the ones above it.

push ──>  ┌───┐
          │ C │  <- top
          ├───┤
          │ B │
          ├───┤
          │ A │  <- bottom
          └───┘
                <-- pop takes C first
Used in:

Stack Frame

The bookkeeping box a function gets while it runs. Holds its local variables and where to return.

Call a function, push a box onto the stack. Inside the box: your locals, the return address, the arguments. Function returns, the box pops off, memory reclaimed for free — no allocator involved.

call f()    call g() from inside f()
┌──────┐    ┌──────┐
│  f   │    │  g   │  ← new frame on top
└──────┘    ├──────┤
            │  f   │
            └──────┘
Used in:

strdup

libc helper. Mallocs a copy of a string and returns the pointer. The caller owns the copy and must free it.

strdup("hello") is malloc(6) + strcpy in one call. Use it when you’re storing a caller’s string and don’t trust them not to free it or overwrite it behind your back.

char *copy = strdup(user_input);   // owns its own buffer
free(copy);                        // forget this, leak

If the input disappears, your copy still stands. Short POSIX function, but not strictly C99. Some strict compilers need -D_POSIX_C_SOURCE=200809L to see it.

Used in:

Struct

A bundle of fields grouped under one name. The C way of building a custom type.

Like a form with labelled boxes: name, age, email. Fill in each box, carry the form around, pass it to functions.

struct point {
    int x;
    int y;
};

Memory-wise it’s the fields laid out one after the other, with padding between them if alignment requires it.

Used in:

U

Undefined Behaviour

Code the language spec refuses to promise anything about. Anything can happen — including 'works fine today, crashes tomorrow'.

Abbreviated UB. Things like reading uninitialised memory, signed integer overflow, or dereferencing a freed pointer. The compiler is allowed to assume you never do these, and will sometimes optimise your code in ways that make no sense once you do.

Rule of thumb: if you’re not sure whether something is UB, it probably is. Check before you ship.

Used in:

V

valgrind

A tool that runs your C program and reports every memory bug: leaks, use-after-free, reads of uninitialised bytes.

Like a surveillance camera on every malloc and free. Slower than normal execution (10× or so), but it catches bugs that would otherwise surface months later in production.

$ valgrind --leak-check=full ./myprog
...
definitely lost: 48 bytes in 2 blocks

Linux-native. On macOS use leaks or AddressSanitizer.

Used in: