mirror of
https://github.com/AppleWin/AppleWin.git
synced 2026-04-20 15:17:50 +00:00
Remove VirtualAlloc, VirtualFree & ZeroMemory. (PR #884)
. Allocation in Memory.cpp: keep VirtualAlloc of size=64KiB (alignment=64KiB) to ease debugging.
This commit is contained in:
@@ -46,9 +46,6 @@ ImageError_e ImageOpen( const std::string & pszImageFilename,
|
||||
std::string& strFilenameInZip,
|
||||
const bool bExpectFloppy /*=true*/)
|
||||
{
|
||||
if (bExpectFloppy && sg_DiskImageHelper.GetWorkBuffer() == NULL)
|
||||
return eIMAGE_ERROR_BAD_POINTER;
|
||||
|
||||
if (!(!pszImageFilename.empty() && ppImageInfo && pWriteProtected))
|
||||
return eIMAGE_ERROR_BAD_POINTER;
|
||||
|
||||
@@ -114,22 +111,6 @@ BOOL ImageBoot(ImageInfo* const pImageInfo)
|
||||
|
||||
//===========================================================================
|
||||
|
||||
void ImageDestroy(void)
|
||||
{
|
||||
VirtualFree(sg_DiskImageHelper.GetWorkBuffer(), 0, MEM_RELEASE);
|
||||
sg_DiskImageHelper.SetWorkBuffer(NULL);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
||||
void ImageInitialize(void)
|
||||
{
|
||||
LPBYTE pBuffer = (LPBYTE) VirtualAlloc(NULL, TRACK_DENIBBLIZED_SIZE*2, MEM_COMMIT, PAGE_READWRITE);
|
||||
sg_DiskImageHelper.SetWorkBuffer(pBuffer);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
||||
void ImageReadTrack( ImageInfo* const pImageInfo,
|
||||
float phase, // phase [0..79] +/- 0.5
|
||||
LPBYTE pTrackImageBuffer,
|
||||
|
||||
Reference in New Issue
Block a user