I'm really curious why you are remotely interested in changing the memory priority of a process. The priority of memory simply determines how important that page of memory is when trimming. There is really no way for you to make that determination yourself as you didn't write the app nor do you know how the app is using the memory. Changing the priority does not impact how much memory is being used by the process and, in fact, may cause performance to get worse if the program is constantly being trimmed.
This low level feature is really designed for programs to use to prioritize their memory usage. For example an app that loads files into memory for perf reasons may mark the thread that manages that memory with a lower priority so it gets written out more frequently than the core process memory. This would be a really extreme example of perf optimization and outside perhaps database apps or similar highly performant programs I cannot imagine why you would ever change this. It gets harder if you have multiple threads working with the same memory because I suspect it is the thread that allocated the page of memory whose priority is used. The process-level priority simply sets the default priority for the threads it creates.