You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
653 B

--- a/newfs_hfs.tproj/makehfs.c
+++ b/newfs_hfs.tproj/makehfs.c
@@ -376,7 +376,7 @@ make_hfsplus(const DriveInfo *driveInfo,
if ( (temp & 0x01FF) != 0 )
temp = (temp + kBytesPerSector) & 0xFFFFFE00;
- nodeBuffer = valloc((size_t)temp);
+ (void)posix_memalign(&nodeBuffer, sysconf(_SC_PAGESIZE), (size_t)temp);
if (nodeBuffer == NULL)
err(1, NULL);
@@ -1814,7 +1814,7 @@ ClearDisk(const DriveInfo *driveInfo, UI
bufferSize = bufferSizeInSectors << kLog2SectorSize;
- tempBuffer = valloc((size_t)bufferSize);
+ (void)posix_memalign(&tempBuffer, sysconf(_SC_PAGESIZE), (size_t)bufferSize);
if (tempBuffer == NULL)
err(1, NULL);