Dynamic memory allocation fails on QEMU sifive_u machine

Dear all,
I had a piece of code of a fast fourier transform, where a 2048*couples of double precision floating-point variables is allocated using the malloc() function.
I use the freedom-e-dsk for that, and I’m targetting the QEMU sifive u54 machine. When the execution arrives there it just hangs for a while. When I allocate only a few couples of variables the execution is done correctly, so I suspect a memory shortage.
Using the ‘-m 256M’ flag in QEMU did not help, and I don’t even know if it’s taken in consideration. How is it possible to increase the memory of an emulated machine on QEMU? Is there another model that has way more memory and which also supports F & D extensions?

Thank you very much in advance.
Best regards,