uring落盘的无锁队列修改

This commit is contained in:
1iaan
2026-02-11 11:59:40 +00:00
parent c1458a6693
commit 68bb4b3f9c
16 changed files with 293 additions and 1135 deletions

View File

@@ -8,7 +8,7 @@
#include <pthread.h>
// #define MEMPOOL_PAGE_SIZE 4096
#define MEMPOOL_PAGE_SIZE (4096*2)
#define MEMPOOL_PAGE_SIZE (256 * 1024)
#define MEMPOOL_BLOCK_MAX_SIZE 512
#define MEMPOOL_ALIGNMENT 8
#define MEMPOOL_NUM_CLASSES (MEMPOOL_BLOCK_MAX_SIZE / MEMPOOL_ALIGNMENT)
@@ -36,7 +36,7 @@ struct mp_page_s{
uint16_t free_count;
uint16_t capacity;
uint64_t bitmap[16]; // 最多支持 512/1280 个块 (64*20)
// uint64_t bitmap[16];
};
struct mp_bucket_s{