os.totalmem() incorrect when called on container (LXD)

os.totalmem() reports an invalid value when use on a continaer - tested on lxd -
How reproduce:

apt install lxd 
lxd init 
# .....

lxc launch ubuntu:18.04 machine1
lxc config set machine1 limits.memory 2500MB
lxc exec machine1 /bin/bash

# install node ......
node 
> os.totalmem()
32xxxxxxxxxx // 32GB 
# result here is the total memory of host no the container

htop shows the correct value
good htop