Mail Archives: djgpp-workers/2018/11/21/07:17:42
--8t9RHnE3ZwKMSgU+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
hi,
djgpp memalign still fails when:
1. alignment is >= 16 bytes
2. some sequence of memory allocations have already occured.
the test case below is reproducible with djgpp cvs and 2.05+nmemalign.patch
(patch was found here: https://aur.archlinux.org/cgit/aur.git/tree/nmemalign.patch?h=dosbox-djcrx)
tested using freedos 1.2 on physical hardware.
---
#include <stdio.h>
#include <malloc.h>
#define TEST(alignment, size) \
printf("memalign(%d,%d)=", alignment, size); \
ptr = memalign(alignment, size); \
printf("%p\n", ptr);
int main()
{
void * ptr;
TEST(1, 46)
TEST(4, 583)
TEST(64, 773)
TEST(32, 889) /* <-- reliably fails here */
return 0;
}
---
-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
--8t9RHnE3ZwKMSgU+
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iF0EABECAB0WIQSpB+AvpuUM0jTNINJnYHnFrEDdawUCW/VMzgAKCRBnYHnFrEDd
a9dzAJ91BK27YetzfmcTuoGlyrqnlJQDGQCdF4R2Fm3JY1oEN08sDirTRMzCiU8=
=raZy
-----END PGP SIGNATURE-----
--8t9RHnE3ZwKMSgU+--
- Raw text -