@denill
Just found this reply from Thomas Frieden and seems (maybe) really usefull to understand our problem:
Why MEMF_VIRTUAL ? Have you actually checked the autodocs ? If yes, where does it even mention MEMF_VIRTUAL ?
MEMF_VIRTUAL is NOT for memory allocations. Use either MEMF_SHARED or MEMF_PRIVATE. Using MEMF_VIRTUAL will make use of the default memory type MEMF_SHARED.
And there's your problem. MEMF_SHARED allocates memory that is automatically locked in memory. This can NOT be paged out. In other words, you basically fill the whole memory and lock it in place. Yes, this will lead to a lockup at one point because there simply is no way to page anything in or out if all memory ends up being locked. Linux "solves" this by killing off random processes and re-using their memory. AmigaOS does not have memory ownership, so there is NOTHING that can be done once this situation arises.
viewtopic.php?f=14&t=666#p8185So in short (for what i can understand as plain user with very little tech knowledge) our problem is that RAM disk use that shared memory (MEMF_SHARED = shared memory ?) so it will no swappable at all and it will freeze instead when we try to fill the RAM disk directory ...
This until they add such "killing off random process" (Linux style)
What i don't understand is why RAM disk use this kind of shared memory if it will prevent us to swap from RAM, i think RAM should be exactly the right place when the system should swap normally, conversely i really don't understand where OS4 can swap ... infact i don't understand how all that VM thing work under AmigaOS4
Pardon if i wrote crap, i just try to understand !