Jay Gandhi

Jay Gandhi

Hey there👋 I am a Software Engineer (individual contributor) with 9+ years of experience with a background in full-stack development and big data solutions. Passionate about developing great product offerings with great people and great teams. Interested in system engineering, software development, UI/UX and product management.

Building a Simple Memory Allocator Using sbrk in C (Malloking Pt. 1)

Details about the Post Introduction Before diving into this article, I recommend reviewing the relevant chapters from Computer Systems: A Programmer’s Perspective (CSAPP), Chris Kanich’s lectures, and Operating Systems: Three Easy Pieces. These resources cover how memory allocation works and what happens under the hood when malloc is called. You’ll also want to understand the brk and sbrk system calls. Use any LLM if you’d like help parsing this material. this post is not a substitute for those references. ...

April 30, 2025 · 5 min · Jay Gandhi

Flow of Control (Control Flow)

Flow of Control (Control Flow) Control flow refers to the order in which instructions, statements, and function calls are executed in an imperative program. It determines how the program progresses based on different structures. Types of Control Flow Sequential Execution – The program executes statements one by one in order. Conditional Execution – The program decides which block of code to execute based on a condition (e.g., if/else in most languages, jne in assembly). Loops (Repetition) – The program repeatedly executes a block of code (for, while, do-while). Function Calls – Control is transferred to a function and returns when it completes. Exception Handling – The program attempts to handle errors using structures like try/catch/finally. Some control flow structures can be combined, such as using while with break, continue, or goto for finer control. ...

October 10, 2024 · 2 min · Jay Gandhi

Log in Apache Kafka

There are numerous articles discussing Apache Kafka[1], covering how companies utilize it, the problems it addresses, and how to create producers and consumers. Instead of diving into those topics right away (which I will certainly cover in future posts), let’s first explore its origins and what makes it faster than other messaging solutions. What is Log? The very first line of the Kafka paper[2 ] says Log processing has become a critical component of the data pipeline for consumer internet companies ...

July 7, 2023 · 4 min · Jay Gandhi

Notes on Write Amplification versus Read Perspiration

This was shared by a colleague. The discussion centered on how log-structured databases are not designed for a 1:1 read-to-write ratio. There are various ways to tune the data structure to favor one over the other. You can read the original article here . About Pat: He is a leading author in areas like distributed architecture, database transaction processing, and more. You can find his latest research on his ACM profile page . Blockquotes in this post are excerpts from his article. ...

July 8, 2022 · 7 min · Jay Gandhi