CaffeineMC / sodium

A Minecraft mod designed to improve frame rates and reduce micro-stutter
Other
4.82k stars 809 forks source link

Use TLSF allocation strategy for terrain geometry #2683

Open jellysquid3 opened 3 months ago

jellysquid3 commented 3 months ago

The current memory allocator we use is very primitive and has both poor performance, while being prone to fragmentation. Rather than designing our own allocator from scratch (which would be a waste of time), we should implement the Two-Level Segregated Fit (TLSF) algorithm.

Some design goals for this implementation are:

jellysquid3 commented 3 months ago

Related: https://github.com/CaffeineMC/sodium-fabric/issues/2233