switch filename calloc to alloca