Adapted allocaAndInit