Hi,
> Lars_Bj�rndal wrote:
> > Dosemu, and I picked the latest CVS (yesterday evening). Now, I can
> > not run WordPerfect 5.1 any more, Dosemu crashes. It's very important
> > for me to be able to run wp. What can I do to this?
> You can set
>
> $_mapping = "mapfile"
>
> in your dosemu.conf.
The patch below also does the job. As far as I could see DPMI no longer
calls this function so I guess I could remove the comment whilst I was at
it.
Bart
--- src/arch/linux/mapping/mapshm.c.~1.11.~ Sun May 9 11:39:26 2004
+++ src/arch/linux/mapping/mapshm.c Sat May 29 21:40:08 2004
@@ -147,15 +147,23 @@
munmap(addr, mapsize);
}
-/*
- * NOTE: DPMI relies on realloc_mapping() _not_ changing the address ('addr'),
- * when shrinking the memory region.
- */
static void *realloc_mapping_shm(int cap, void *addr, int oldsize, int newsize)
{
+ void *ret;
Q__printf("MAPPING: realloc, cap=%s, addr=%p, oldsize=%x, newsize=%x\n",
cap, addr, oldsize, newsize);
- return mremap(addr, oldsize, newsize, MREMAP_MAYMOVE);
+
+ if (newsize <= oldsize)
+ return mremap(addr, oldsize, newsize, MREMAP_MAYMOVE);
+
+ /* expanded new memory is apparently not shared so can't be aliased.
+ so we must allocate a new region and memcpy to it */
+ ret = alloc_mapping_shm(cap, newsize);
+ if (ret != MAP_FAILED) {
+ memcpy(ret, addr, oldsize);
+ free_mapping_shm(cap, addr, oldsize);
+ }
+ return ret;
}
static void *mmap_mapping_shm(int cap, void *target, int mapsize, int protect, void
*source)
-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html