malloc: Use uintptr_t in alloc_buffer