Function in function

Extra functions was added for thread safe stability. Now when user calls
get_alloc() of free_alloc() functions call for their original versions
with LOCK and check_flag enable