Refactored memory mapping for 32-bit systems support.
Fixed deduplication code.