Hi Jiri. 2012/7/20 Jiří Zárevúcky <[email protected]>: >> I have one comment/question. I have tried the memalign test from the >> #395 [1] and it works. But: I have run it in Qemu (ia32 build) and if >> the RAM is 33MB it produces quite unexpected output - it is possible >> to allocate bigger chunk of aligned memory than of unaligned. I.e., >> memalign() succeeds where malloc() fails for the same size. >> > > Is it possible that you used the function as written in the ticket, > i.e. memalign(1 << i, 32)? You are a right. Sorry for the fuss, I should have read the code more carefully.
> That call has a wrong order of arguments. Alignment should be first. > I suspect that would explain the difference. After thinking more about why I wrote the test that way, the ordering is correct. The idea was to test various alignments and malloc() was used only to "test" how much memory is available. Thanks and sorry again. - Vojta > > _______________________________________________ > HelenOS-devel mailing list > [email protected] > http://lists.modry.cz/cgi-bin/listinfo/helenos-devel _______________________________________________ HelenOS-devel mailing list [email protected] http://lists.modry.cz/cgi-bin/listinfo/helenos-devel
