You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix for low RAM: reduce number of particles dynamically
If PS memory allocation fails, try several times, reducing the number of particles rather than just quitting. This helps with larger setups that may not have enough memory in a contiguous block. Now chances of a PS running are much higher.
updatePSpointers(advPartProps != nullptr, advPartSize != nullptr); // update pointers to PS data, also updates availableParticles
971
-
PSPRINTLN("\n END update System2D, running FX...");
971
+
//PSPRINTLN("\n END update System2D, running FX...");
972
972
}
973
973
974
974
// set the pointers for the class (this only has to be done once and not on every FX call, only the class pointer needs to be reassigned to SEGENV.data every time)
975
975
// function returns the pointer to the next byte available for the FX (if it assigned more memory for other stuff using the above allocate function)
976
976
// FX handles the PSsources, need to tell this function how many there are
// a pointer MUST be 4 byte aligned. sizeof() in a struct/class is always aligned to the largest element. if it contains a 32bit, it will be padded to 4 bytes, 16bit is padded to 2byte alignment.
981
981
// The PS is aligned to 4 bytes, a PSparticle is aligned to 2 and a struct containing only byte sized variables is not aligned at all and may need to be padded when dividing the memoryblock.
0 commit comments