Implemented several alloc-related functions.
fixed some compiler errors before writing free/coalesce