It is actually not a bug that Roblox’s tracked memory differs from the task manager’s and is due to differences in accounting of memory. At a high level, there are different “kinds” of memory:
- Physical memory (RAM sticks) vs virtual memory (the OS can also use your SSD/HDD to store data & eject less important data (such as for background processes or infrequently accessed memory in the current process) from physical memory to disk & recall it later, just at much slower speeds than if it were in RAM. This is called “paging” in/out memory
- Released memory vs free memory (when the application “releases” memory, the OS may have not yet made that memory available to other processes on the system yet)
- It is common for programs to use “proxy” allocators where when you request 1 MB of memory, it actually allocates 5 MB from the system to prepare for future allocations and reduce the amount of calls to the system allocator. In this case, the program may report less memory than is being used if the tracking is at a high enough level that it doesn’t have complete visibility into the allocator
- The OS also gives processes more memory than they are currently using so they have headroom to grow, which will cause a difference in accounting (given vs used)
- Multiple programs can share memory blocks. I’m not sure how Windows accounts for this in the task manager, but it may not count that memory or divide it between all of the processes equally while to the process’s tracking it looks like it is responsible for all of that memory (so it reports a > value than task manager)
- The program may “lazily” allocate memory where some part of the program says it needs 1 GB of memory, but the lower level systems only allocate that as it’s being used rather than upfront, resulting in the opposite tracking effect as we saw for proxy allocators
If you are really wanting to get into the weeds, then you can use programs like Resource Monitor and VMMap to see the specific kinds of memory the program is using, but otherwise you can use Roblox’s tracked memory values as your source of truth.