This commit is contained in:
azw 2023-05-08 13:57:10 +00:00
parent 278f1aa616
commit 221a25b597
2 changed files with 10 additions and 1 deletions

View File

@ -23,7 +23,10 @@ namespace a8
char* OrderBuffer::Alloc(int len)
{
if (len <= 0) {
abort();
}
int real_len = len + 4;
}
void OrderBuffer::Free(char* p)

View File

@ -1,5 +1,7 @@
#pragma once
#include <atomic>
namespace a8
{
@ -14,8 +16,12 @@ namespace a8
void Free(char* p);
private:
char* buf_ = nullptr;
int buf_len_ = 0;
std::atomic<int> start_ = 0;
std::atomic<int> end_ = 0;
};
}