MCPcopy Create free account
hub / github.com/Simple-XX/SimpleKernel / IoBuffer

Method IoBuffer

tests/unit_test/mocks/io_buffer_mock.cpp:14–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12#include "io_buffer.hpp"
13
14IoBuffer::IoBuffer(size_t size, size_t /*alignment*/)
15 : data_{static_cast<uint8_t*>(malloc(size))}, size_{size} {
16 if (data_ != nullptr) {
17 memset(data_, 0, size);
18 }
19}
20
21IoBuffer::~IoBuffer() {
22 free(data_);

Callers

nothing calls this directly

Calls 2

mallocFunction · 0.85
memsetFunction · 0.85

Tested by

no test coverage detected