[Penlin] add MACRO to control the allocation method