JIT compilers, by definition, generate code on the fly for execution. But in, say, Windows, we have all kinds of protection that prevent self modifying code or executing from data memory (DEP).
So how is it possible for JIT compilers to generate code on the fly?