---
name: "__gnu_cxx::free_list"
section: "3"
platform: "linux"
package: "gcc"
version: "16.2.1+r23+gd564253eb6c8-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/__gnu_cxx::free_list"
---

# \_\_gnu\_cxx::free\_list(3)

The free list class for managing chunks of memory to be given to and returned by the bitmap\_allocator.

## NAME

\_\_gnu\_cxx::free\_list - The free list class for managing chunks of memory to be given to and returned by the bitmap\_allocator.

## SYNOPSIS

\#include \<bitmap\_allocator.h\>

Inherited by **\_\_gnu\_cxx::bitmap\_allocator\< \_Tp1 \>** \[private\], \_\_gnu\_cxx::bitmap\_allocator\< void \>, and **\_\_gnu\_cxx::bitmap\_allocator\< \_Tp \>** \[private\].

### Public Types

typedef \_\_mutex **\_\_mutex\_type**\
 typedef vector\_type::iterator **iterator**\
 typedef std::size\_t \* **value\_type**\
 typedef **\_\_detail::\_\_mini\_vector**\< value\_type \> **vector\_type**\

### Public Member Functions

void **\_M\_clear** ()\
 This function just clears the internal Free List, and gives back all the memory to the OS.  std::size\_t \* **\_M\_get** (std::size\_t \_\_sz)\
 This function gets a block of memory of the specified size from the free list.  void **\_M\_insert** (std::size\_t \*\_\_addr)  throw ()\
 This function returns the block of memory to the internal free list.

## Detailed Description

The free list class for managing chunks of memory to be given to and returned by the bitmap\_allocator.

## Member Function Documentation

### void \_\_gnu\_cxx::free\_list::\_M\_clear ()

This function just clears the internal Free List, and gives back all the memory to the OS.

### std::size\_t \* \_\_gnu\_cxx::free\_list::\_M\_get (std::size\_t \_\_sz)

This function gets a block of memory of the specified size from the free list.

**Parameters**

*\_\_sz* The size in bytes of the memory required.

**Returns**

A pointer to the new memory block of size at least equal to that requested.

### void \_\_gnu\_cxx::free\_list::\_M\_insert (std::size\_t \* \_\_addr) \[inline\]

This function returns the block of memory to the internal free list.

**Parameters**

*\_\_addr* The pointer to the memory block that was given by a call to the \_M\_get function.

Referenced by **\_\_gnu\_cxx::bitmap\_allocator\< \_Tp1 \>::\_M\_deallocate\_single\_object()**.

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
