bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

new module 'ssfmalloc'


From: Bruno Haible
Subject: new module 'ssfmalloc'
Date: Mon, 19 Oct 2020 04:23:49 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-189-generic; KDE/5.18.0; x86_64; ; )

This patch adds a new module 'ssfmalloc', a "simple and straight-forward memory
allocation" facility.

I need this as an auxiliary module for the partial function module, which is
still work in progress.

It's similar to a general-purpose malloc, with three differences that the
usual malloc doesn't provide:
  - It is based on a "back end" that allocates and deallocates memory pages.
    The back end can be replaced by another one.
  - The module can be configured to leave a fixed amount of room at the
    beginning of each memory page. Some back ends need this.
  - The alignment of the memory blocks can be configured to be larger than
    4 or 8. 16 or 32 are supported as well.

It's a straight-forward implementation in the sense that the implementation
is derived from two principles. See the code for details.

It's multithread-safe, but not particularly optimized for many threads.

The code size is reasonably small, e.g. 3x smaller than the classical
dlmalloc.

The initial memory allocation is small as well.

Bruno

Attachment: 0001-ssfmalloc-New-module.patch
Description: Text Data

Attachment: 0002-ssfmalloc-Add-tests.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]