Hi Jiri! 2012/7/20 Jiří Zárevúcky <[email protected]>: > On 20 July 2012 16:55, Jiří Zárevúcky <[email protected]> wrote: >> On 20 July 2012 16:36, Jakub Jermar <[email protected]> wrote: >>> >>> In your patch, why don't you simply add size and align in area_grow(), >>> just as you do for the new areas? >>> >> >> I wanted to avoid requesting more pages than necessary, but now that I >> think about it, it probably doesn't really matter, does it? >> What I find peculiar though is that growing the area always creates a >> new free block, even if the previous block is free. >> Seems to me like a completely unnecessary fragmentation. > > There, my final iteration. 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.
I admit I haven't investigated this in more detail (what is the exact difference where this phenomenon occurs) but maybe you would be able to answer right away. Do you think that is an expected behaviour of your implementation or it indicates some subtle problem? Thanks! - Vojta [1] http://trac.helenos.org/ticket/395 > I went back to just adding the alignment size regardless of whether > it's necessary. Shouldn't matter much. > What I kept is allocation directly after grow, and I modified > area_grow() to append to the last block if possible. > Feel free to ignore that last part if you wish, it just seemed to me > like the right thing to do there. > > _______________________________________________ > 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
