design_pattern_for_c  V 1.00
memorypool_t Struct Reference

MemoryPool class member definition, detail is defined in C file. More...

#include <memorypool.h>

Collaboration diagram for memorypool_t:

Data Fields

malloc_data_thead
 
malloc_data_ttail
 
size_t max_size
 
size_t max_cnt
 
size_t cur_cnt
 
size_t slide_bit
 keep slide bit size related to max_size, to search buffer fast More...
 
uint8_t * buf
 list of buffer for user + list of malloc_data_t More...
 
uint8_t * user_buf
 list of buffer for user More...
 
pthread_mutex_t * lock
 mutex More...
 

Detailed Description

MemoryPool class member definition, detail is defined in C file.

definition of malloc manage data, to search data fast, add buffer_unused list and unfull list for check buffer_unused (because buffer_unused will over 

/*

Definition at line 45 of file memorypool.c.

Field Documentation

◆ buf

uint8_t* buf

list of buffer for user + list of malloc_data_t

Definition at line 52 of file memorypool.c.

◆ cur_cnt

size_t cur_cnt

Definition at line 50 of file memorypool.c.

◆ head

Definition at line 46 of file memorypool.c.

◆ lock

pthread_mutex_t* lock

mutex

Definition at line 54 of file memorypool.c.

◆ max_cnt

size_t max_cnt

Definition at line 49 of file memorypool.c.

◆ max_size

size_t max_size

Definition at line 48 of file memorypool.c.

◆ slide_bit

size_t slide_bit

keep slide bit size related to max_size, to search buffer fast

Definition at line 51 of file memorypool.c.

◆ tail

Definition at line 47 of file memorypool.c.

◆ user_buf

uint8_t* user_buf

list of buffer for user

Definition at line 53 of file memorypool.c.


The documentation for this struct was generated from the following file: