14.04.2012 06:25, Bart Oldeman написал: > well I agree things should be cleaned up for sure. As far as I can see > LOWMEM() is only used in a few places -- it could be completely > removed. I've just had a look into a possibility of using LOWMEM() for the mappers, eliminating the special meaning of MAPPING_LOWMEM and MAPPING_HMA, which are adding lowmem_base to the source. The mappers can use LOWMEM() explicitly, instead of using the magic flags, because the EMM can map from both the lowmem_base shm and the malloc()'ed areas, so it needs to set the source addr explicitly. But it turned out that the mapping code is over-complicated to do even that simple change. It now has alloc_mapping(), mmap_mapping() and alias_mapping(). mmap_mapping() takes MAPPING_SCRATCH, which makes it to behave mostly similar to alloc_mapping(), and it can take MAPPING_LOWMEM|MAPPING_HMA, which makes it to behave similar to alias_mapping(). It is basically impossible to change anything there without a risk of introducing a regression. Would it be possible to remove an outdated flags, and use the new API instead? I.e. move the MAPPING_SCRATCH handling from mmap_mapping() to alloc_mapping(), use alias_mapping() instead of MAPPING_HMA|MAPPING_LOWMEM etc, so that mmap_mapping() to became smaller than it currently is.
This probably cannot be done in one go, and svn doesn't allow a local commits. I was using git for all these years long, and I hate svn now. :) Any chances to use git for dosemu? Then I'll be able to resolve the mess by a set of the small local commits, then properly integrate my EMM changes, and post the entire patchset, rather than the one big and messy patch. ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ Dosemu-devel mailing list Dosemu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dosemu-devel