joblib.Parallel does not have a memory locking function. There are two ways to bypass this: (1) specify it in the Parallel call using require='sharedmem' and (2) use automated memory mapping for numpy arrays.
Other methods can also be used but do not seem to be very efficient. More information and usage examples are provided at: https://joblib.readthedocs.io/en/latest/parallel.html#shared-memory-semantics