Functions to control the streaming memory/buffer sizes [Fixes #3084]#3086
Conversation
|
Some notices:
engineStreamingSetMemorySize(9000 * 1024 * 1024)
-- or
engineStreamingSetMemorySize(-1)
|
|
That it something the argparser should do, not me. |
|
"That it something the argparser should do, not me." |
That's exactly what #2114 aims to fix.
You might say it's the amount of RAM the PC has - But it isn't as the OS can just use the swap file [slow, but would still work]. |
|
wonder what happen if you set max memory stream to 0 😂 |
|
Whole map starts flickering, nothing interesting |
This is MTA issue. We don't perform this checks in new argument parser now. Can be fixed in next backward incompatible release via #2114. So this should not block this PR. |
|
NOTE: Wiki pages need to be added |
@Pirulax I hope you can add these functions to the wiki this soon, it's actually a responsibility of the feature's contributor and should have been checked off (or with a clear plan to work on it immediately) around merge time. If not done, it will be a waste as usage of these functions will be minimal. There is even a chance of revert if this requirement can't be checked off on. |
|
I've added the pages. Please check them out, and let me know if there are any errors: Also, it seems like I didn't add a |
This PR aims to implement the function as discussed here
engineStreamingSetMemorySizeengineStreamingGetMemorySizeengineStreamingRestoreMemorySizeengineStreamingSetBufferSizeengineStreamingGetBufferSizeAlso added a new class
EngineStreamingfor all streaming-related functions, and 2 new class variables:memorySize- The streaming memory size [in bytes] - Can also be set [usesengineStreamingSetMemorySizeinterally]usedMemory- Amount of memory used right now for streamingExample usage [and unit test]: