Qubes already handles memory allocation automatically for you. No need to make things harder than they have to be.