A basic implementation of malloc function using C