We present a comparison of the characteristics of magnetic domain walls in an atomic monolayer of Co on Pt(111) and a Ni/Fe atomic bilayer on Ir(111) based on spin-polarized scanning tunneling microscopy measurements. In both cases, the films exhibit a roughly triangular dislocation line pattern created by epitaxial strain relief, as well as out-of-plane ferromagnetic order. Domains with opposite magnetization are separated by domain walls with a unique rotational sense, demonstrating the important role of the Dzyaloshinskii-Moriya interaction induced by the Co/Pt and Fe/Ir interfaces. The domain walls in Co/Pt(111) are straight and usually found in geometrical constrictions of the film, where they can minimize their length. In contrast, the domain walls in Ni/Fe/Ir(111) follow complicated paths, which can be correlated to the structural triangular pattern. The comparison between the two systems shows that the structural patterns, despite their similarity, have a different impact on the domain walls. In the Co/Pt(111) case, the magnetic state is not influenced by the dislocation line network, in contrast to the Ni/Fe/Ir(111) system in which the formation of the walls is favored at specific positions of the structural pattern.