I've tried using a 4GB swapfile. I tried 8GB but it would not allow it.
When the memory usage gets to around 4GB, then swapfile kicks ( using "top" to read memory ).
I have never seen "kodi.bin" get over 4gb before it cashes.
Now I restart kodi when it gets close to 4gb and stopped using a swapfile.
Like I mentioned before.. there is a fix, just waiting for one
I have two NUC's ( nuc7i5bnk, nuc6cayh ) with same issue