Does Kt Native 0.6 support win32?


This is the error I got:

Error occurred during initialization of VM
Could not reserve enough space for 3145728KB object heap

After googling it, all I see was about Java and Window 32bit can’t run compiler has high RAM.
I have try some solutions for Java but it doesn’t work for Kt, so…
Any help?


I am pretty sure that solutions for java will not work on kotlin native as those are completely different runtime environments.

I`m not sure why your error is talking about a VM but I think I understand the error. A 32bit System can only use about 4GB of memory as that is all that can be addressed by a 32bit pointer. It’s actually a bit less. It’s more like 3.5GB and than this memory has to be shared by the operating system and the user. So without some tricks your application should only be able to use about 2GB of memory at any given point (Don’t quote me on those numbers). You are trying to use about 3.

So what can you do. I guess you don’t have the option to just switch to a 64bit System :wink: so you will either have to implement a system which uses less memory or you have to look into some caching algorithms. Also there some of the solutions might not be possible due to the early stage of Kotlin native. I am not sure how much influence you have over memory allocation and how efficient Kotlin is behind the hood.


32-bit Windows is not supported.


Woops your right. Forgot about that.