Skip to content

Releases: spaskalev/buddy_alloc

v1.2.0

23 Sep 06:29
4a97c2c
Compare
Choose a tag to compare
  • Add a new buddy_get_embed_at function to get a handle to the allocator when having a pointer to the arena.
  • Add a new enum buddy_safe_free_status that is returned from the buddy_safe_free function. It can be used to detect invalid free calls and fail early.
  • Document the allocator metadata size based on some common arena and smallest allocation block sizes.

v1.1.1

15 Jun 00:01
5dce4fe
Compare
Choose a tag to compare
  • Support compiling with Pelles C
  • Add a cmake target for the benchmark
  • Fixed a few harmless compile warnings

v1.1.0

22 Nov 22:13
22efc4d
Compare
Choose a tag to compare
  • Add a parameter to buddy_realloc that allows it to ignore data. Useful for resizing buffers when there is no longer any interest in their content.
  • Minor style and repo changes.

v1.0.0

09 Oct 13:01
95ce902
Compare
Choose a tag to compare

External changes:

  • buddy_walk callback is now invoked for free slots in addition to allocated ones and has an extra parameter to distinguish between free and allocated.
  • buddy_fragmentation return type is now an unsigned char that ranges between 0 and 255 and no float types are used. This way fragmentation can be reported when used in environments that don't support the float type.

Internal changes:

  • A static inline two_to_the_power_of helper function that returns size_t is used in place of manual power of two calculations.
  • The fast square root algorithm used in the fragmentation formula has been replaced with an integer square root algorithm by Martin Guy, 1985.

Misc:

Two years and nine months have passed since this project started and it has now reached the 1.0.0 milestone. Thanks to all contributors and users for their interest in it.

v0.9

22 Aug 19:41
Compare
Choose a tag to compare
  • Remove FAMs and {0} initializers to facilitate interop with strict C++ compilers
    • Clang generates identical code with FAMs and without FAMs
    • GCC generates almost-identical code
  • Make the debug functions non-static so that they can be used by code in other units
  • Include stdio.h only when BUDDY_PRINTF is not defined
  • Add a macro for C++ name mangling

v0.8

13 Jun 05:52
Compare
Choose a tag to compare
  • The allocator is now easier to use within a linux kernel/module.
    • Conforms to the c90-style variable declarations in functions
    • New defines BUDDY_PRINTF, BUDDY_HEADER and BUDDY_FRAG_OPTIONAL added to allow conditional inclusion of functionality and setting a suitable printf-like function for the debug functions.
  • Fixed some issues with explicit alignment init functions
  • Fixed UB on invalid free calls

v0.7.2

10 Jun 18:34
Compare
Choose a tag to compare
  • Additional performance improvements
  • Stricter compile-time checks
  • Fixed code coverage reporting and got coverage back to 100%.

v0.7.1

07 Jun 08:23
Compare
Choose a tag to compare

This is a significant performance update achieved by reducing the number of tree reads during allocation.

Running bench.c using gcc -O2 on v0.7 takes 20 seconds vs 16 seconds on v0.7.1
Running bench.c using clang -O3 on v0.7 takes 16 seconds vs 13 seconds on v0.7.1

v0.7

28 May 19:27
Compare
Choose a tag to compare
  • Add buddy_arena_free_size that reports the remaining free space in the arena.
    Note that this is a sum of all slots and not necessarily continuous memory.
  • Support setting alignment as an argument to init and sizeof functions.
    This way an application can use multiple allocator instances with different alignments. The BUDDY_ALLOC_ALIGN define is still supported.
    This is a change in the internal structure of the allocator which can impact serialized instances. There's no impact to regular users.
  • Always use the optimal fit algorithm, drop support for the left-bias one.
  • Drop the BUDDY_ALLOC_SAFETY define, always use safety checks.
  • Jump to version v0.7. v0.6 was a botched release that was deleted

v0.5.1

08 Dec 06:47
906ecbe
Compare
Choose a tag to compare
  • Added support for compiling with MSVC
  • Made the library usable from C++