  Let $\mathcal{L}$ be a subspace lattice on a Banach space $X$ and let
$\delta:\mathrm{Alg}\mathcal{L}\rightarrow B(X)$ be a linear mapping. If
$\vee\{L\in \mathcal{L}: L_-\nsupseteq L\}=X$ or $\wedge\{L_-:L\in \mathcal{L},
L_-\nsupseteq L\}=(0)$, we show that the following three conditions are
equivalent: (1) $\delta(AB)=\delta(A)B+A\delta(B)$ whenever $AB=0$; (2)
$\delta(AB+BA)=\delta(A)B+A\delta(B)+\delta(B)A+B\delta(A)$ whenever $AB+BA=0$;
(3) $\delta$ is a generalized derivation and $\delta(I)\in
(\mathrm{Alg}\mathcal{L})^\prime$. If $\vee\{L\in \mathcal{L}: L_-\nsupseteq
L\}=X$ or $\wedge\{L_-:L\in \mathcal{L}, L_-\nsupseteq L\}=(0)$ and $\delta$
satisfies $\delta(AB+BA)=\delta(A)B+A\delta(B)+\delta(B)A+B\delta(A)$ whenever
$AB=0$, we obtain that $\delta$ is a generalized derivation and
$\delta(I)A\in(\mathrm{Alg}\mathcal{L})^\prime$ for every $A\in
\mathrm{Alg}\mathcal{L}$. We also prove that if $\vee\{L\in \mathcal{L}:
L_-\nsupseteq L\}=X$ and $\wedge\{L_-:L\in \mathcal{L}, L_-\nsupseteq L\}=(0)$,
then $\delta$ is a local generalized derivation if and only if $\delta$ is a
generalized derivation.
