Skip to content

0.6.0

Compare
Choose a tag to compare
@mjp41 mjp41 released this 09 May 12:40
· 169 commits to main since this release
d5c732f

This is a major revision of the snmalloc design. The redesign has been primarily focused on adding new security features. The redesign affects all aspects of snmalloc. A more comprehensive explanation of the new features can be found in the docs

  • Uses Buddy Allocators for large allocations: In 0.5.3, we never reconsolidate large allocations, so if you ask for several 1MiB allocations, return them, and then ask for several 2MiB allocations it won't be able to use the space from the 1MiB allocations.  This is not a problem in 0.6 as we have a proper buddy allocator at that level so we recombine the big bits of memory properly
  • Variable sized slabs and out of band meta-data - Previously, snmalloc used fixed sized super slabs with metadata at the head. By using variable sized slabs and out of band meta-data, the slabs don't have to be grouped into superslabs which reduces the minimum memory requirement. (https://github.com/microsoft/snmalloc/blob/main/docs/security/VariableSizedChunks.md)
  • Improved per thread caching - #511 - This enables very small per thread usage initially that can grow to the level required. This means that low foot print scenarios on OpenEnclave can be supported with exactly the same code paths as high footprint scenarios. This brings the per thread costs down to approximately 16k per thread of metadata + 16k per thread per sizeclass used. This will grow in powers of 2 (upto 2MiB) to cover the required amount.