C - Fast & simple bump allocator
could I get some tips on optimization, etc.


Alignment loss

free_ptr = (char*) free_ptr + size; simply increases the next available allocation to so many bytes later.  This differs from malloc() whose allocations meets all possible system alignment needs. 

Either document that bump_alloc() does not provide aligned allocations or change code to do so.

Error messages

I'd expect the error message to go out stderr - yet your call.

// printf("unable to map memory\n");
fprintf(stderr, "Unable to map memory\n");


Missing include

intptr_t is define in &lt;stdint.h&gt;.  Best to include that rather than rely of a hidden inclusion.

Good type math

The below avoids int overflow. 

#define KB(size) ((size_t) size * 1024)


Better code would () each macro parameter.

#define KB(size) ((size_t) (size) * 1024)


Yet I'd recommend rather than type-casting, which may narrow the math, allow gentle widening.  The below multiplication will occur with the wider of size_t and the type of size.

#define KB(size) ((size_t) 1024 * (size))


Unneeded cast, simplify

Casting not needed going from void * to an object pointer.  Size to the de-referenced type.  Easier to code right, review and maintain.

// int* x = (int*) bump_alloc(sizeof(int));
int* x = bump_alloc(sizeof *x);