# bitmap_allocator.h File Reference

## Detailed Description

This file is a GNU extension to the Standard C++ Library.

Definition in file bitmap_allocator.h.

Go to the source code of this file.

## Namespaces

- namespace __gnu_cxx
- namespace __gnu_cxx::balloc

## Defines

- #define _BALLOC_ALIGN_BYTES
- #define _BALLOC_ASSERT(_EXPR)
- #define _BITMAP_ALLOCATOR_H

## Enumerations

- enum { bits_per_byte, bits_per_block }

## Functions

- void __bit_allocate (size_t *__pbmap, size_t __pos) throw ()
- void __bit_free (size_t *__pbmap, size_t __pos) throw ()
- template<typename _InputIterator, typename _Predicate> _InputIterator __find_if (_InputIterator __first, _InputIterator __last, _Predicate __p)
- template<typename _ForwardIterator, typename _Tp, typename _Compare> _ForwardIterator __lower_bound (_ForwardIterator __first, _ForwardIterator __last, const _Tp &__val, _Compare __comp)
- template<typename _AddrPair> size_t __num_bitmaps (_AddrPair __ap)
- template<typename _AddrPair> size_t __num_blocks (_AddrPair __ap)
- size_t _Bit_scan_forward (size_t __num)
- template<typename _Tp1, typename _Tp2> bool operator!= (const bitmap_allocator< _Tp1 > &, const bitmap_allocator< _Tp2 > &) throw ()
- template<typename _Tp1, typename _Tp2> bool operator== (const bitmap_allocator< _Tp1 > &, const bitmap_allocator< _Tp2 > &) throw ()

## Variables

- bool const __threads_enabled

## Define Documentation

#define _BALLOC_ALIGN_BYTES

| The constant in the expression below is the alignment required in bytes. Definition at line 62 of file bitmap_allocator.h.

## Function Documentation

void __gnu_cxx::balloc::__bit_allocate | ( | size_t * | __pbmap,
|  | size_t | __pos
| ) | throw ()`[inline]`

| Mark a memory address as allocated by re-setting the corresponding bit in the bit-map. Definition at line 677 of file bitmap_allocator.h.

void __gnu_cxx::balloc::__bit_free | ( | size_t * | __pbmap,
|  | size_t | __pos
| ) | throw ()`[inline]`

| Mark a memory address as free by setting the corresponding bit in the bit-map. Definition at line 688 of file bitmap_allocator.h.

size_t __gnu_cxx::balloc::__num_bitmaps | ( | _AddrPair | __ap | ) | `[inline]`

| The number of Bit-maps pointed to by the address pair passed to the function. Definition at line 461 of file bitmap_allocator.h. References __gnu_cxx::balloc::__num_blocks().

size_t __gnu_cxx::balloc::__num_blocks | ( | _AddrPair | __ap | ) | `[inline]`

| The number of Blocks pointed to by the address pair passed to the function. Definition at line 453 of file bitmap_allocator.h. Referenced by __gnu_cxx::balloc::__num_bitmaps().

size_t __gnu_cxx::_Bit_scan_forward | ( | size_t | __num | ) | `[inline]`

| Generic Version of the bsf instruction. Definition at line 698 of file bitmap_allocator.h.

## Variable Documentation

bool const __threads_enabled `[static]`

| If true, then the application being compiled will be using threads, so use mutexes as a synchronization primitive, else do no use any synchronization primitives. Definition at line 81 of file bitmap_allocator.h.