Various fixes in alloc* related files