working 32 bits mmap strategy, enhanced code