Hello Tom,
unfortunately (thanks TK CHIA) sbreak() tries to increase the size for malloc'ed memory. if it succeeds (and needed memory is located behind SwapTransientSize: BAMM!
Thank you! I did find a bug concerning the swapping of the transient portion to XMS, though it is of a different kind (https://github.com/FDOS/freecom/pull/2).
As Bart Oldeman mentioned, under GCC (with Newlib) the stack is at a higher address than the heap; so sbrk ( ) does not actually call out to DOS to ask for more memory --- it just keeps track of an internal pointer and tries to prevent it from colliding with the stack. So it should be fine to calculate the transient size just once, in the GCC case.
Thank you! -- https://github.com/tkchia ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel