Use SIZE_T instead of size_t
Include stdlib.h to fix possible warnings