ADMA-首字母缩写词不代表任何含义 Adma是zig的通用分配器,具有以下功能: 优化用于快速的小内存分配/释放 重复使用操作系统提供的分配 非阻塞分配和线程内空闲 多线程能力 自动减少功能以供单线程使用 安全释放发送到其他线程的内存 入门 在Zig中: const adma = @Import ( "adma" ); pub fn example () ! void { // .initWith using a c allocator //const adma_ref = try adma.AdmaAllocator.initWith(std.heap.c_allocator, 0); // .init defaults to using std.heap.page_allocator underneath for ease of use