Growing Pains: realloc and Automatic Capacity Management

Post 2 of the Dynamic Arrays in C series · Full source code Where We Left Off In Post 1 we built an array that does three things: allocate a fixed buffer, push integers into it, and free everything when we’re done. It works, until it doesn’t. The moment the user pushes one element more than the initial capacity allows, array_push returns -1 and refuses to cooperate. The array is full and there’s nothing we can do about it. ...

May 28, 2026 · 14 min · pablo

What malloc() does not want you to know

Post 1 of 13 — Series: Memory Allocation and Garbage Collection from Scratch Every time you write malloc(128), something apparently magical happens: the runtime hands you a pointer to 128 bytes of memory nobody else is using. You didn’t ask the operating system for permission. You didn’t specify where those bytes should live. They simply appeared. And when you call free(), they vanish back into the void. The magic is a lie. ...

May 24, 2026 · 15 min · pablo

Hello World: Pointers, Memory, and Low-Level C

Every C project starts with a printf("Hello, World!\n");, and this blog is no exception. Welcome to pablogs.dev. I’ve been wanting to create a personal space for a while now to document my projects, organize my thoughts, and most importantly, share what I learn about systems programming and low-level C. Often, when coding in higher-level languages, we take the underlying magic for granted: how memory is allocated, how resources are cleaned up, or how data structures grow. ...

May 22, 2026 · 2 min · Pablo