You can use the shell’s ulimit command to set various process limits; use the -d option to set the maximum size of the process’s data segment (i.e. the heap), and -s for the stack. However, non-root users can only reduce their limits, they can’t increase them.
How do I allocate more memory to Linux?
Linux provides a variety of APIs for memory allocation. You can allocate small chunks using kmalloc or kmem_cache_alloc families, large virtually contiguous areas using vmalloc and its derivatives, or you can directly request pages from the page allocator with alloc_pages .
How do I dedicate more RAM to a process?
Open the “Task Manager” in Windows and click the Processes option and right click the desired priority process. Click Set Priority and the RAM will now focus on that specific program. It will speed up and operate more efficiently with the newly allocated RAM.