RTEMS 6.1-rc2
|
RTEMS Run-Time Linker Bit Allocator Header. More...
Go to the source code of this file.
Data Structures | |
struct | rtems_rtl_bit_alloc |
Typedefs | |
typedef struct rtems_rtl_bit_alloc | rtems_rtl_bit_alloc |
Functions | |
rtems_rtl_bit_alloc * | rtems_rtl_bit_alloc_open (void *base, size_t size, size_t block_size, size_t used) |
void | rtems_rtl_bit_alloc_close (rtems_rtl_bit_alloc *balloc) |
void * | rtems_rtl_bit_alloc_balloc (rtems_rtl_bit_alloc *balloc, size_t size) |
void | rtems_rtl_bit_alloc_bfree (rtems_rtl_bit_alloc *balloc, void *addr, size_t size) |
RTEMS Run-Time Linker Bit Allocator Header.
typedef struct rtems_rtl_bit_alloc rtems_rtl_bit_alloc |
Bit Allocator data
void * rtems_rtl_bit_alloc_balloc | ( | rtems_rtl_bit_alloc * | balloc, |
size_t | size | ||
) |
Allocate a piece of memory being managed. The size is in bytes are is rounded up the next block size.
balloc | The allocator. |
size | Number of bytes to allocate. |
void rtems_rtl_bit_alloc_bfree | ( | rtems_rtl_bit_alloc * | balloc, |
void * | addr, | ||
size_t | size | ||
) |
Free an allocated memory block. The size is required because the allocator does not contain any state information.
void rtems_rtl_bit_alloc_close | ( | rtems_rtl_bit_alloc * | balloc | ) |
Close the bit allocator.
balloc | The allocator to close. |
rtems_rtl_bit_alloc * rtems_rtl_bit_alloc_open | ( | void * | base, |
size_t | size, | ||
size_t | block_size, | ||
size_t | used | ||
) |
Open a bit allocator. The allocator allocates block_size pieces of the memory being managed.
base | The memory to managem NULL to allocate a piece of memory. |
size | The size of the memory being managed in bytes. |
block_size | The minimum allocation unit in bytes. |
used | The amount of memory already in use in bytes. |
rtems_rtl_bit_alloc | The bit allocator structure. |