From 936a4d04846d3963b9faa3d3fe13db15fc605587 Mon Sep 17 00:00:00 2001 From: Jorj Bauer Date: Wed, 10 Jan 2018 08:14:38 -0500 Subject: [PATCH] static allocator for diskii raw disk buffer --- apple/diskii.cpp | 2 -- apple/diskii.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/apple/diskii.cpp b/apple/diskii.cpp index 75fe729..dfc8693 100644 --- a/apple/diskii.cpp +++ b/apple/diskii.cpp @@ -22,7 +22,6 @@ DiskII::DiskII(AppleMMU *mmu) { this->trackBuffer = new LRingBuffer(NIBTRACKSIZE); - this->rawTrackBuffer = (uint8_t *)malloc(4096); this->mmu = mmu; @@ -46,7 +45,6 @@ DiskII::DiskII(AppleMMU *mmu) DiskII::~DiskII() { delete this->trackBuffer; this->trackBuffer = NULL; - free(this->rawTrackBuffer); this->rawTrackBuffer = NULL; } bool DiskII::Serialize(int8_t fd) diff --git a/apple/diskii.h b/apple/diskii.h index 28d64c7..3c991e7 100644 --- a/apple/diskii.h +++ b/apple/diskii.h @@ -56,7 +56,7 @@ class DiskII : public Slot { volatile bool trackDirty; // does this track need flushing to disk? uint8_t readWriteLatch; LRingBuffer *trackBuffer; // nibblized data - uint8_t *rawTrackBuffer; // not nibblized data + uint8_t rawTrackBuffer[4096]; // not nibblized data bool writeMode; bool writeProt;