real mode memory management question (Developers)
> It's a bit strange. Initially I can malloc 500 * 1024 (and also 650 * 1024
> which would be 650 KB) and later in the loop it breakes after 59 * 1024
> (which should be only 59 KB) due to malloc error.
(Note: I don't really know C++, so take this with a grain of salt.)
Why are you using long double to define how much you want? Floats / doubles are always stored differently. Plus, you're mixing C malloc() with C++ stuff instead of using new / delete (why?). Anyways, at least DJGPP (for example) won't malloc() any mem until you actually need it, unlike calloc().
P.S. Try asking in openwatcom.users.c_cpp if none of us can help.
EDIT: 650k should never work (else you're doing something VERY weird).
Complete thread:
- real mode memory management question - mr, 24.08.2008, 18:42 (Developers)
- real mode memory management question - Japheth, 24.08.2008, 21:03
- real mode memory management question - mr, 24.08.2008, 21:19
- real mode memory management question - Japheth, 24.08.2008, 21:27
- real mode memory management question - mr, 24.08.2008, 21:19
- real mode memory management question - rr, 24.08.2008, 23:17
- real mode memory management question - mr, 24.08.2008, 23:30
- real mode memory management question - rr, 24.08.2008, 23:42
- real mode memory management question - mr, 25.08.2008, 00:53
- real mode memory management question - Rugxulo, 25.08.2008, 03:53
- real mode memory management question - marcov, 25.08.2008, 10:34
- real mode memory management question - Rugxulo, 25.08.2008, 03:53
- real mode memory management question - mr, 25.08.2008, 00:53
- real mode memory management question - rr, 24.08.2008, 23:42
- real mode memory management question - mr, 24.08.2008, 23:30
- real mode memory management question - marcov, 25.08.2008, 10:51
- real mode memory management question - Japheth, 24.08.2008, 21:03