Cannot increase java memory heap size on Ubuntu


I have 12Go of RAM on Ubuntu 64 bits and have modified ~/snap/etc/snap.conf to use 8Go for the initial and the maximum java heap size:

default_options="-J-Xms8G -J-Xmx8G"

But inside Snap Gui > Help > About Snap: The memory used (shown in the bottom of the popup window) is just 1821M.
Also, in ~/.snap/var/log/messages, after running Snap, it’s not reading all the memory:

Heap memory usage: initial 256.0MB maximum 1820.5MB

Any way to increase the java heap size on Ubuntu (on Windows I don’t remember having this issue)?

This bug seems to have been fixed on the last version of snap.

on a 32 bit machine max heap available is 1628MB
on a 64 bit machine max heap available is 2^64 (theoretically) but there are limitations