MOSEK requires a certain amount of memory to store a given optimization problem. The exact amount is proportional to the number of variables, constraints and non-zero entries in the problem. Moreover, some additional memory is required to optimize it. How much depends on the structural properties of the problem. In general it is not possible to predict how much memory MOSEK will require to solve a particular problem.
Depending on the operating system different options exist to circumvent the out of space problem.