Segment memory mapped boot image region

This commit is contained in:
topjohnwu
2023-07-13 21:01:49 -07:00
parent 4caed73fe0
commit c97ab690b6
3 changed files with 83 additions and 64 deletions
+1 -1
View File
@@ -211,7 +211,7 @@ class byte_channel;
struct heap_data : public byte_data {
ALLOW_MOVE_ONLY(heap_data)
explicit heap_data(size_t sz) : byte_data(malloc(sz), sz) {}
explicit heap_data(size_t sz) : byte_data(calloc(sz, 1), sz) {}
~heap_data() { free(_buf); }
// byte_channel needs to reallocate the internal buffer