ERRCODE_PROGRAM_LIMIT_EXCEEDED: Check before potential repalloc()