As the limit of 32bits systems is 4GB of RAM and the system needs memory for Swap, kernel among others the practical limit is around 1.4GB to 1.6GB (source) .
Relationship between PermSize and HeapSize :
Traditional heap = Objects
perm heap = class definitions
In other words, the heap perm is an additional space separate from conventional heap space (for objects). So the bigger the space you set for it, the more space it will take on the system, and this will limit the maximum your system will allow for the conventional heap.
Therefore, the heap is not included in the heap (Xmx), but it can limit it by consuming an additional system space that on a 32bits system will be much more limited than on a 64bits.
Exemplifying: 512Mb + 1024Mb = 1.5Gb
(total space your system allowed for the JVM) as you can see is in the range described at the beginning of this answer.
See the official documentation on the oracle site.
The table below shows how to set these options in the JVM
+-----------------+----------------------------------------+---------------------+
| Opção da JVM | Significado | Exemplo |
| -Xms | heap size inicial da JVM | -Xms3072M |
| -Xmx | tamanho máximo do heap da JVM | -Xmx16G |
| -XX:PermSize | tamanho inicial do espaço permanente | -XX:PermSize=128k |
| -XX:MaxPermSize | tamannho máximo do espaço permanente | -XX:MaxPermSize=256m|
+-----------------+----------------------------------------+---------------------+
I think it is useful to have this table in an answer about this since I suspect that not everyone knows how to configure such elements