Suppose that for random reasons I want the footnote mark before the text it is related to instead of after it. Then the code
\documentclass{memoir}
\begin{document}
Hello my name is Gaussler and I have a problem with footnotes before linebreaks. If the word is sufficiently long, the line breaks look just \footnote{Footnote}superhypoerproblematic and I don't know what to do about it, so can you help me solve this problem? It would be really nice, and I would appreciate it and +1 your answer and say thank you very much, you're very nice.
\end{document}
produces

Wait, that looks horrible. The word goes outside the margin. How to solve this?
(BTW, yes, I have noticed the typo. And I don't care.)

\footnote{x}\nolinebreak\hspace{0pt}overlongword. But what's the meaning of footnote markers attached to the following word? – egreg Dec 29 '14 at 21:04