4. Given that $a, b, c$ satisfy
$$
a x+b y+2 c=0, c \neq 0, a b-c^{2} \geqslant 0 \text {. }
$$

Then the maximum value of $x y$ is ( ).
(A) $\frac{1}{10}$
(B) 1
(C) $\frac{6}{5}$
(D) 2
4. B.

Let $x y=m$. From $a b-c^{2} \geqslant 0, c \neq 0$, we know
$$
\begin{array}{l}
a b>0 \Rightarrow b \neq 0 \\
\Rightarrow y=\frac{-a x-2 c}{b} \Rightarrow m=x \frac{-a x-2 c}{b} \\
\Rightarrow a x^{2}+2 c x+b m=0 \\
\Rightarrow \Delta=(2 c)^{2}-4 a b m \geqslant 0 \\
\Rightarrow m \leqslant \frac{c^{2}}{a b} \leqslant \frac{a b}{a b}=1 .
\end{array}
$$

Therefore, the maximum value of $m=x y$ is 1.