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

  1. --- a/newfs_hfs.tproj/makehfs.c
  2. +++ b/newfs_hfs.tproj/makehfs.c
  3. @@ -376,7 +376,7 @@ make_hfsplus(const DriveInfo *driveInfo,
  4. if ( (temp & 0x01FF) != 0 )
  5. temp = (temp + kBytesPerSector) & 0xFFFFFE00;
  6. - nodeBuffer = valloc((size_t)temp);
  7. + (void)posix_memalign(&nodeBuffer, sysconf(_SC_PAGESIZE), (size_t)temp);
  8. if (nodeBuffer == NULL)
  9. err(1, NULL);
  10. @@ -1814,7 +1814,7 @@ ClearDisk(const DriveInfo *driveInfo, UI
  11. bufferSize = bufferSizeInSectors << kLog2SectorSize;
  12. - tempBuffer = valloc((size_t)bufferSize);
  13. + (void)posix_memalign(&tempBuffer, sysconf(_SC_PAGESIZE), (size_t)bufferSize);
  14. if (tempBuffer == NULL)
  15. err(1, NULL);