mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-29 18:27:20 +02:00
Revert "tlsf control's structure should remain opaque"
This reverts commit 7010314c4a
.
This commit is contained in:
@ -57,30 +57,6 @@
|
||||
** NOTE: TLSF spec relies on ffs/fls returning value 0..31.
|
||||
** ffs/fls return 1-32 by default, returning 0 for error.
|
||||
*/
|
||||
|
||||
/* The TLSF control structure. */
|
||||
typedef struct control_t
|
||||
{
|
||||
/* Empty lists point at this block to indicate they are free. */
|
||||
block_header_t block_null;
|
||||
|
||||
/* Local parameter for the pool */
|
||||
unsigned int fl_index_count;
|
||||
unsigned int fl_index_shift;
|
||||
unsigned int fl_index_max;
|
||||
unsigned int sl_index_count;
|
||||
unsigned int sl_index_count_log2;
|
||||
unsigned int small_block_size;
|
||||
size_t size;
|
||||
|
||||
/* Bitmaps for free lists. */
|
||||
unsigned int fl_bitmap;
|
||||
unsigned int *sl_bitmap;
|
||||
|
||||
/* Head of free lists. */
|
||||
block_header_t** blocks;
|
||||
} control_t;
|
||||
|
||||
static inline __attribute__((__always_inline__)) int tlsf_ffs(unsigned int word)
|
||||
{
|
||||
const unsigned int reverse = word & (~word + 1);
|
||||
|
@ -72,6 +72,29 @@ typedef struct block_header_t
|
||||
struct block_header_t* prev_free;
|
||||
} block_header_t;
|
||||
|
||||
/* The TLSF control structure. */
|
||||
typedef struct control_t
|
||||
{
|
||||
/* Empty lists point at this block to indicate they are free. */
|
||||
block_header_t block_null;
|
||||
|
||||
/* Local parameter for the pool */
|
||||
unsigned int fl_index_count;
|
||||
unsigned int fl_index_shift;
|
||||
unsigned int fl_index_max;
|
||||
unsigned int sl_index_count;
|
||||
unsigned int sl_index_count_log2;
|
||||
unsigned int small_block_size;
|
||||
size_t size;
|
||||
|
||||
/* Bitmaps for free lists. */
|
||||
unsigned int fl_bitmap;
|
||||
unsigned int *sl_bitmap;
|
||||
|
||||
/* Head of free lists. */
|
||||
block_header_t** blocks;
|
||||
} control_t;
|
||||
|
||||
#include "heap_tlsf_block_functions.h"
|
||||
|
||||
/* tlsf_t: a TLSF structure. Can contain 1 to N pools. */
|
||||
|
Reference in New Issue
Block a user