Kawhan Laurindo

WHOISKAWHAN / SOFTWARE ENGINEER / João Pessoa

Language

PROJECTS / 2022

libft

Reimplementing the C standard library at 42 São Paulo. No garbage collector, no safety net — just malloc, free, and the consequences of getting it wrong.

OVERVIEW

The first project in the 42 São Paulo curriculum: rewriting part of the C standard library from scratch, plus extra string helpers and a small linked-list API. The library becomes the foundation for later projects, so it has to be right. It scored 100% on the community testers (libftest, libftTester, libft-unit-test and libft-war-machine).

CONCEPT

Manual memory management. With no runtime behind you, every malloc needs a matching free, and every function must handle the edge cases libc handles for you: null pointers, zero sizes, overlapping memory, overflow. Understanding why memmove exists next to memcpy is the kind of thing that only sticks once you implement both.

FEATURES

  • libc functions: memory, string and character handling
  • Helpers such as split, strjoin, substr and itoa
  • Linked-list API
  • Built as a static library with a Makefile

STACK

  • C
Back to portfolio