summaryrefslogtreecommitdiff
path: root/data_buffer.h
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2023-04-21 18:42:46 +0300
committerOxore <oxore@protonmail.com>2023-04-21 18:42:46 +0300
commit8856f2ee0e19f50c4c4fb3dc7fccc8150a00da81 (patch)
tree575d6b65bf425a27d487f6987c6331763e388ec8 /data_buffer.h
parent25762ee11dadb333f5b63c359abb615dc5f16b09 (diff)
Refactor asm rendering
Diffstat (limited to 'data_buffer.h')
-rw-r--r--data_buffer.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/data_buffer.h b/data_buffer.h
new file mode 100644
index 0000000..c3d86e8
--- /dev/null
+++ b/data_buffer.h
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <cstddef>
+#include <cstdint>
+
+struct DataBuffer {
+ static constexpr size_t kInitialSize = 4 * 1024;
+ uint8_t *buffer{new uint8_t[kInitialSize]};
+ size_t buffer_size{kInitialSize};
+ size_t occupied_size{};
+ void Expand(size_t new_size);
+ ~DataBuffer();
+};
+