Use smaller mallocs to support dos
authorBill Lash <william.lash@gmail.com>
Sun, 13 Oct 2019 01:09:31 +0000 (20:09 -0500)
committerBill Lash <william.lash@gmail.com>
Sun, 13 Oct 2019 01:09:31 +0000 (20:09 -0500)
commit633b813fda6979ff9936eab051729c0a7d7c482d
tree8f0879d07b574e4fab812146d5be4f4a97258eff
parentef13cdee2c58119dad04fe2bdb854336bfcf4820
Use smaller mallocs to support dos

The DOS version has trouble with the large malloc in the undo
system that mallocs 2.5 times the dynamic memory.  This is used
as 1.5 times the dynamic memory for the diff part, and space to
save the dynamic memory.  When memory beyond the 64k barrier was
accessed, there was a crash (at least that seems like what was
happening).  Instead of mallocing all the memory at once and and
setting the pointer to the diff part to after the dynamic memory
part, I changed it to seperately malloc both parts.

It still may be that at 1.5 the dynamic memory size, that the diff
could go past 64k.  Might want to check for that and handle it.
src/common/fastmem.c