From: sparky4 Date: Thu, 8 Jun 2017 23:00:57 +0000 (-0500) Subject: i feel horrendous! i should stop! i fixed up showmemorydetail function ^^. and initia... X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=71052570b201b2831361b9890c41480f9826cfd7;p=16.git i feel horrendous! i should stop! i fixed up showmemorydetail function ^^. and initial implementation of heap stuff for borland c --- diff --git a/DEBUG.16B b/DEBUG.16B index 29f57fbf..cb447fa5 100755 --- a/DEBUG.16B +++ b/DEBUG.16B @@ -1,208 +1,208 @@ -Seg:0 Size:5734 Owner:0x0 -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Seg:1666 Size:256 Owner:0x7649 +Seg:0 Size:5977 Owner:0x0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Seg:1759 Size:256 Owner:0x78ad 0 -Seg:1766 Size:256 Owner:0x3416 +Seg:1859 Size:256 Owner:0x367a 0 -Seg:1866 Size:256 Owner:0x3418 +Seg:1959 Size:256 Owner:0x367c 0 -Seg:1966 Size:256 Owner:0x341a +Seg:1a59 Size:256 Owner:0x367e 0 -Seg:1a66 Size:256 Owner:0x341c +Seg:1b59 Size:256 Owner:0x3680 0 -Seg:1b66 Size:256 Owner:0x341e +Seg:1c59 Size:256 Owner:0x3682 0 -Seg:1c66 Size:256 Owner:0x3420 +Seg:1d59 Size:256 Owner:0x3684 0 -Seg:1d66 Size:256 Owner:0x3422 +Seg:1e59 Size:256 Owner:0x3686 0 -Seg:1e66 Size:256 Owner:0x3424 +Seg:1f59 Size:256 Owner:0x3688 0 -Seg:1f66 Size:256 Owner:0x3426 +Seg:2059 Size:256 Owner:0x368a 0 -Seg:2066 Size:256 Owner:0x3428 +Seg:2159 Size:256 Owner:0x368c 0 -Seg:2166 Size:256 Owner:0x342a +Seg:2259 Size:256 Owner:0x368e 0 -Seg:2266 Size:256 Owner:0x342c +Seg:2359 Size:256 Owner:0x3690 0 -Seg:2366 Size:256 Owner:0x342e +Seg:2459 Size:256 Owner:0x3692 0 -Seg:2466 Size:256 Owner:0x3430 +Seg:2559 Size:256 Owner:0x3694 0 -Seg:2566 Size:256 Owner:0x3432 +Seg:2659 Size:256 Owner:0x3696 0 -Seg:2666 Size:256 Owner:0x3434 +Seg:2759 Size:256 Owner:0x3698 0 -Seg:2766 Size:256 Owner:0x3436 +Seg:2859 Size:256 Owner:0x369a 0 -Seg:2866 Size:256 Owner:0x3438 +Seg:2959 Size:256 Owner:0x369c 0 -Seg:2966 Size:256 Owner:0x343a +Seg:2a59 Size:256 Owner:0x369e 0 -Seg:2a66 Size:256 Owner:0x343c +Seg:2b59 Size:256 Owner:0x36a0 0 -Seg:2b66 Size:256 Owner:0x343e +Seg:2c59 Size:256 Owner:0x36a2 0 -Seg:2c66 Size:256 Owner:0x3440 +Seg:2d59 Size:256 Owner:0x36a4 0 -Seg:2d66 Size:256 Owner:0x3442 +Seg:2e59 Size:256 Owner:0x36a6 0 -Seg:2e66 Size:256 Owner:0x3444 +Seg:2f59 Size:256 Owner:0x36a8 0 -Seg:2f66 Size:256 Owner:0x3446 +Seg:3059 Size:256 Owner:0x36aa 0 -Seg:3066 Size:256 Owner:0x3448 +Seg:3159 Size:256 Owner:0x36ac 0 -Seg:3166 Size:256 Owner:0x344a +Seg:3259 Size:256 Owner:0x36ae 0 -Seg:3266 Size:256 Owner:0x344c +Seg:3359 Size:256 Owner:0x36b0 0 -Seg:3366 Size:256 Owner:0x344e +Seg:3459 Size:256 Owner:0x36b2 0 -Seg:3466 Size:256 Owner:0x3450 +Seg:3559 Size:256 Owner:0x36b4 0 -Seg:3566 Size:256 Owner:0x3452 +Seg:3659 Size:256 Owner:0x36b6 0 -Seg:3666 Size:256 Owner:0x3454 +Seg:3759 Size:256 Owner:0x36b8 0 -Seg:3766 Size:256 Owner:0x3456 +Seg:3859 Size:256 Owner:0x36ba 0 -Seg:3866 Size:256 Owner:0x3458 +Seg:3959 Size:256 Owner:0x36bc 0 -Seg:3966 Size:256 Owner:0x345a +Seg:3a59 Size:256 Owner:0x36be 0 -Seg:3a66 Size:256 Owner:0x345c +Seg:3b59 Size:256 Owner:0x36c0 0 -Seg:3b66 Size:256 Owner:0x345e +Seg:3c59 Size:256 Owner:0x36c2 0 -Seg:3c66 Size:256 Owner:0x3460 +Seg:3d59 Size:256 Owner:0x36c4 0 -Seg:3d66 Size:256 Owner:0x3462 +Seg:3e59 Size:256 Owner:0x36c6 0 -Seg:3e66 Size:256 Owner:0x3464 +Seg:3f59 Size:256 Owner:0x36c8 0 -Seg:3f66 Size:256 Owner:0x3466 +Seg:4059 Size:256 Owner:0x36ca 0 -Seg:4066 Size:256 Owner:0x3468 +Seg:4159 Size:256 Owner:0x36cc 0 -Seg:4166 Size:256 Owner:0x346a +Seg:4259 Size:256 Owner:0x36ce 0 -Seg:4266 Size:256 Owner:0x346c +Seg:4359 Size:256 Owner:0x36d0 0 -Seg:4366 Size:256 Owner:0x346e +Seg:4459 Size:256 Owner:0x36d2 0 -Seg:4466 Size:256 Owner:0x3470 +Seg:4559 Size:256 Owner:0x36d4 0 -Seg:4566 Size:256 Owner:0x3472 +Seg:4659 Size:256 Owner:0x36d6 0 -Seg:4666 Size:256 Owner:0x3474 +Seg:4759 Size:256 Owner:0x36d8 0 -Seg:4766 Size:256 Owner:0x3476 +Seg:4859 Size:256 Owner:0x36da 0 -Seg:4866 Size:256 Owner:0x3478 +Seg:4959 Size:256 Owner:0x36dc 0 -Seg:4966 Size:256 Owner:0x347a +Seg:4a59 Size:256 Owner:0x36de 0 -Seg:4a66 Size:256 Owner:0x347c +Seg:4b59 Size:256 Owner:0x36e0 0 -Seg:4b66 Size:256 Owner:0x347e +Seg:4c59 Size:256 Owner:0x36e2 0 -Seg:4c66 Size:256 Owner:0x3480 +Seg:4d59 Size:256 Owner:0x36e4 0 -Seg:4d66 Size:256 Owner:0x3482 +Seg:4e59 Size:256 Owner:0x36e6 0 -Seg:4e66 Size:256 Owner:0x3484 +Seg:4f59 Size:256 Owner:0x36e8 0 -Seg:4f66 Size:256 Owner:0x3486 +Seg:5059 Size:256 Owner:0x36ea 0 -Seg:5066 Size:256 Owner:0x3488 +Seg:5159 Size:256 Owner:0x36ec 0 -Seg:5166 Size:256 Owner:0x348a +Seg:5259 Size:256 Owner:0x36ee 0 -Seg:5266 Size:256 Owner:0x348c +Seg:5359 Size:256 Owner:0x36f0 0 -Seg:5366 Size:256 Owner:0x348e +Seg:5459 Size:256 Owner:0x36f2 0 -Seg:5466 Size:256 Owner:0x3490 +Seg:5559 Size:256 Owner:0x36f4 0 -Seg:5566 Size:256 Owner:0x3492 +Seg:5659 Size:256 Owner:0x36f6 0 -Seg:5666 Size:256 Owner:0x3494 +Seg:5759 Size:256 Owner:0x36f8 0 -Seg:5766 Size:256 Owner:0x3496 +Seg:5859 Size:256 Owner:0x36fa 0 -Seg:5866 Size:256 Owner:0x3498 +Seg:5959 Size:256 Owner:0x36fc 0 -Seg:5966 Size:256 Owner:0x349a +Seg:5a59 Size:256 Owner:0x36fe 0 -Seg:5a66 Size:256 Owner:0x349c +Seg:5b59 Size:256 Owner:0x3700 0 -Seg:5b66 Size:256 Owner:0x349e +Seg:5c59 Size:256 Owner:0x3702 0 -Seg:5c66 Size:256 Owner:0x34a0 +Seg:5d59 Size:256 Owner:0x3704 0 -Seg:5d66 Size:256 Owner:0x34a2 +Seg:5e59 Size:256 Owner:0x3706 0 -Seg:5e66 Size:256 Owner:0x34a4 +Seg:5f59 Size:256 Owner:0x3708 0 -Seg:5f66 Size:256 Owner:0x34a6 +Seg:6059 Size:256 Owner:0x370a 0 -Seg:6066 Size:256 Owner:0x34a8 +Seg:6159 Size:256 Owner:0x370c 0 -Seg:6166 Size:256 Owner:0x34aa +Seg:6259 Size:256 Owner:0x370e 0 -Seg:6266 Size:256 Owner:0x34ac +Seg:6359 Size:256 Owner:0x3710 0 -Seg:6366 Size:256 Owner:0x34ae +Seg:6459 Size:256 Owner:0x3712 0 -Seg:6466 Size:256 Owner:0x34b0 +Seg:6559 Size:256 Owner:0x3714 0 -Seg:6566 Size:256 Owner:0x34b2 +Seg:6659 Size:256 Owner:0x3716 0 -Seg:6666 Size:256 Owner:0x34b4 +Seg:6759 Size:256 Owner:0x3718 0 -Seg:6766 Size:256 Owner:0x34b6 +Seg:6859 Size:256 Owner:0x371a 0 -Seg:6866 Size:256 Owner:0x34b8 +Seg:6959 Size:256 Owner:0x371c 0 -Seg:6966 Size:256 Owner:0x34ba +Seg:6a59 Size:256 Owner:0x371e 0 -Seg:6a66 Size:256 Owner:0x34bc +Seg:6b59 Size:256 Owner:0x3720 0 -Seg:6b66 Size:256 Owner:0x34be +Seg:6c59 Size:256 Owner:0x3722 0 -Seg:6c66 Size:256 Owner:0x34c0 +Seg:6d59 Size:256 Owner:0x3724 0 -Seg:6d66 Size:256 Owner:0x34c2 +Seg:6e59 Size:256 Owner:0x3726 0 -Seg:6e66 Size:256 Owner:0x34c4 +Seg:6f59 Size:256 Owner:0x3728 0 -Seg:6f66 Size:256 Owner:0x34c6 +Seg:7059 Size:256 Owner:0x372a 0 -Seg:7066 Size:256 Owner:0x34c8 +Seg:7159 Size:256 Owner:0x372c 0 -Seg:7166 Size:256 Owner:0x34ca +Seg:7259 Size:256 Owner:0x372e 0 -Seg:7266 Size:256 Owner:0x34cc +Seg:7359 Size:256 Owner:0x3730 0 -Seg:7366 Size:256 Owner:0x34ce +Seg:7459 Size:256 Owner:0x3732 0 -Seg:7466 Size:256 Owner:0x34d0 +Seg:7559 Size:256 Owner:0x3734 0 -Seg:7566 Size:256 Owner:0x34d2 +Seg:7659 Size:256 Owner:0x3736 0 -Seg:7666 Size:256 Owner:0x34d4 +Seg:7759 Size:256 Owner:0x3738 0 -Seg:7766 Size:256 Owner:0x34d6 +Seg:7859 Size:256 Owner:0x373a 0 -Seg:7866 Size:256 Owner:0x34d8 +Seg:7959 Size:256 Owner:0x373c 0 -Seg:7966 Size:256 Owner:0x34da +Seg:7a59 Size:256 Owner:0x373e 0 -Seg:7a66 Size:256 Owner:0x34dc +Seg:7b59 Size:256 Owner:0x3740 0 -Seg:7b66 Size:273 Owner:0x7649 -000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +Seg:7c59 Size:273 Owner:0x78ad +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Seg:9fbe Size:32834 Owner:0x0  Seg:9ffe Size:24577 Owner:0x0 diff --git a/DEBUG.16W b/DEBUG.16W index e3f2fbb2..e870ee77 100755 --- a/DEBUG.16W +++ b/DEBUG.16W @@ -1,210 +1,210 @@ -Seg:0 Size:9775 Owner:0x0 +Seg:0 Size:9789 Owner:0x0 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++00 -Seg:2697 Size:76 Owner:0x0 +Seg:26a6 Size:76 Owner:0x0 0 -Seg:26e3 Size:256 Owner:0x5fec +Seg:26f2 Size:256 Owner:0x5fcc 0 -Seg:27e3 Size:256 Owner:0x1e22 +Seg:27f2 Size:256 Owner:0x1e02 0 -Seg:28e3 Size:256 Owner:0x1e24 +Seg:28f2 Size:256 Owner:0x1e04 0 -Seg:29e3 Size:256 Owner:0x1e26 +Seg:29f2 Size:256 Owner:0x1e06 0 -Seg:2ae3 Size:256 Owner:0x1e28 +Seg:2af2 Size:256 Owner:0x1e08 0 -Seg:2be3 Size:256 Owner:0x1e2a +Seg:2bf2 Size:256 Owner:0x1e0a 0 -Seg:2ce3 Size:256 Owner:0x1e2c +Seg:2cf2 Size:256 Owner:0x1e0c 0 -Seg:2de3 Size:256 Owner:0x1e2e +Seg:2df2 Size:256 Owner:0x1e0e 0 -Seg:2ee3 Size:256 Owner:0x1e30 +Seg:2ef2 Size:256 Owner:0x1e10 0 -Seg:2fe3 Size:256 Owner:0x1e32 +Seg:2ff2 Size:256 Owner:0x1e12 0 -Seg:30e3 Size:256 Owner:0x1e34 +Seg:30f2 Size:256 Owner:0x1e14 0 -Seg:31e3 Size:256 Owner:0x1e36 +Seg:31f2 Size:256 Owner:0x1e16 0 -Seg:32e3 Size:256 Owner:0x1e38 +Seg:32f2 Size:256 Owner:0x1e18 0 -Seg:33e3 Size:256 Owner:0x1e3a +Seg:33f2 Size:256 Owner:0x1e1a 0 -Seg:34e3 Size:256 Owner:0x1e3c +Seg:34f2 Size:256 Owner:0x1e1c 0 -Seg:35e3 Size:256 Owner:0x1e3e +Seg:35f2 Size:256 Owner:0x1e1e 0 -Seg:36e3 Size:256 Owner:0x1e40 +Seg:36f2 Size:256 Owner:0x1e20 0 -Seg:37e3 Size:256 Owner:0x1e42 +Seg:37f2 Size:256 Owner:0x1e22 0 -Seg:38e3 Size:256 Owner:0x1e44 +Seg:38f2 Size:256 Owner:0x1e24 0 -Seg:39e3 Size:256 Owner:0x1e46 +Seg:39f2 Size:256 Owner:0x1e26 0 -Seg:3ae3 Size:256 Owner:0x1e48 +Seg:3af2 Size:256 Owner:0x1e28 0 -Seg:3be3 Size:256 Owner:0x1e4a +Seg:3bf2 Size:256 Owner:0x1e2a 0 -Seg:3ce3 Size:256 Owner:0x1e4c +Seg:3cf2 Size:256 Owner:0x1e2c 0 -Seg:3de3 Size:256 Owner:0x1e4e +Seg:3df2 Size:256 Owner:0x1e2e 0 -Seg:3ee3 Size:256 Owner:0x1e50 +Seg:3ef2 Size:256 Owner:0x1e30 0 -Seg:3fe3 Size:256 Owner:0x1e52 +Seg:3ff2 Size:256 Owner:0x1e32 0 -Seg:40e3 Size:256 Owner:0x1e54 +Seg:40f2 Size:256 Owner:0x1e34 0 -Seg:41e3 Size:256 Owner:0x1e56 +Seg:41f2 Size:256 Owner:0x1e36 0 -Seg:42e3 Size:256 Owner:0x1e58 +Seg:42f2 Size:256 Owner:0x1e38 0 -Seg:43e3 Size:256 Owner:0x1e5a +Seg:43f2 Size:256 Owner:0x1e3a 0 -Seg:44e3 Size:256 Owner:0x1e5c +Seg:44f2 Size:256 Owner:0x1e3c 0 -Seg:45e3 Size:256 Owner:0x1e5e +Seg:45f2 Size:256 Owner:0x1e3e 0 -Seg:46e3 Size:256 Owner:0x1e60 +Seg:46f2 Size:256 Owner:0x1e40 0 -Seg:47e3 Size:256 Owner:0x1e62 +Seg:47f2 Size:256 Owner:0x1e42 0 -Seg:48e3 Size:256 Owner:0x1e64 +Seg:48f2 Size:256 Owner:0x1e44 0 -Seg:49e3 Size:256 Owner:0x1e66 +Seg:49f2 Size:256 Owner:0x1e46 0 -Seg:4ae3 Size:256 Owner:0x1e68 +Seg:4af2 Size:256 Owner:0x1e48 0 -Seg:4be3 Size:256 Owner:0x1e6a +Seg:4bf2 Size:256 Owner:0x1e4a 0 -Seg:4ce3 Size:256 Owner:0x1e6c +Seg:4cf2 Size:256 Owner:0x1e4c 0 -Seg:4de3 Size:256 Owner:0x1e6e +Seg:4df2 Size:256 Owner:0x1e4e 0 -Seg:4ee3 Size:256 Owner:0x1e70 +Seg:4ef2 Size:256 Owner:0x1e50 0 -Seg:4fe3 Size:256 Owner:0x1e72 +Seg:4ff2 Size:256 Owner:0x1e52 0 -Seg:50e3 Size:256 Owner:0x1e74 +Seg:50f2 Size:256 Owner:0x1e54 0 -Seg:51e3 Size:256 Owner:0x1e76 +Seg:51f2 Size:256 Owner:0x1e56 0 -Seg:52e3 Size:256 Owner:0x1e78 +Seg:52f2 Size:256 Owner:0x1e58 0 -Seg:53e3 Size:256 Owner:0x1e7a +Seg:53f2 Size:256 Owner:0x1e5a 0 -Seg:54e3 Size:256 Owner:0x1e7c +Seg:54f2 Size:256 Owner:0x1e5c 0 -Seg:55e3 Size:256 Owner:0x1e7e +Seg:55f2 Size:256 Owner:0x1e5e 0 -Seg:56e3 Size:256 Owner:0x1e80 +Seg:56f2 Size:256 Owner:0x1e60 0 -Seg:57e3 Size:256 Owner:0x1e82 +Seg:57f2 Size:256 Owner:0x1e62 0 -Seg:58e3 Size:256 Owner:0x1e84 +Seg:58f2 Size:256 Owner:0x1e64 0 -Seg:59e3 Size:256 Owner:0x1e86 +Seg:59f2 Size:256 Owner:0x1e66 0 -Seg:5ae3 Size:256 Owner:0x1e88 +Seg:5af2 Size:256 Owner:0x1e68 0 -Seg:5be3 Size:256 Owner:0x1e8a +Seg:5bf2 Size:256 Owner:0x1e6a 0 -Seg:5ce3 Size:256 Owner:0x1e8c +Seg:5cf2 Size:256 Owner:0x1e6c 0 -Seg:5de3 Size:256 Owner:0x1e8e +Seg:5df2 Size:256 Owner:0x1e6e 0 -Seg:5ee3 Size:256 Owner:0x1e90 +Seg:5ef2 Size:256 Owner:0x1e70 0 -Seg:5fe3 Size:256 Owner:0x1e92 +Seg:5ff2 Size:256 Owner:0x1e72 0 -Seg:60e3 Size:256 Owner:0x1e94 +Seg:60f2 Size:256 Owner:0x1e74 0 -Seg:61e3 Size:256 Owner:0x1e96 +Seg:61f2 Size:256 Owner:0x1e76 0 -Seg:62e3 Size:256 Owner:0x1e98 +Seg:62f2 Size:256 Owner:0x1e78 0 -Seg:63e3 Size:256 Owner:0x1e9a +Seg:63f2 Size:256 Owner:0x1e7a 0 -Seg:64e3 Size:256 Owner:0x1e9c +Seg:64f2 Size:256 Owner:0x1e7c 0 -Seg:65e3 Size:256 Owner:0x1e9e +Seg:65f2 Size:256 Owner:0x1e7e 0 -Seg:66e3 Size:256 Owner:0x1ea0 +Seg:66f2 Size:256 Owner:0x1e80 0 -Seg:67e3 Size:256 Owner:0x1ea2 +Seg:67f2 Size:256 Owner:0x1e82 0 -Seg:68e3 Size:256 Owner:0x1ea4 +Seg:68f2 Size:256 Owner:0x1e84 0 -Seg:69e3 Size:256 Owner:0x1ea6 +Seg:69f2 Size:256 Owner:0x1e86 0 -Seg:6ae3 Size:256 Owner:0x1ea8 +Seg:6af2 Size:256 Owner:0x1e88 0 -Seg:6be3 Size:256 Owner:0x1eaa +Seg:6bf2 Size:256 Owner:0x1e8a 0 -Seg:6ce3 Size:256 Owner:0x1eac +Seg:6cf2 Size:256 Owner:0x1e8c 0 -Seg:6de3 Size:256 Owner:0x1eae +Seg:6df2 Size:256 Owner:0x1e8e 0 -Seg:6ee3 Size:256 Owner:0x1eb0 +Seg:6ef2 Size:256 Owner:0x1e90 0 -Seg:6fe3 Size:256 Owner:0x1eb2 +Seg:6ff2 Size:256 Owner:0x1e92 0 -Seg:70e3 Size:256 Owner:0x1eb4 +Seg:70f2 Size:256 Owner:0x1e94 0 -Seg:71e3 Size:256 Owner:0x1eb6 +Seg:71f2 Size:256 Owner:0x1e96 0 -Seg:72e3 Size:256 Owner:0x1eb8 +Seg:72f2 Size:256 Owner:0x1e98 0 -Seg:73e3 Size:256 Owner:0x1eba +Seg:73f2 Size:256 Owner:0x1e9a 0 -Seg:74e3 Size:256 Owner:0x1ebc +Seg:74f2 Size:256 Owner:0x1e9c 0 -Seg:75e3 Size:256 Owner:0x1ebe +Seg:75f2 Size:256 Owner:0x1e9e 0 -Seg:76e3 Size:256 Owner:0x1ec0 +Seg:76f2 Size:256 Owner:0x1ea0 0 -Seg:77e3 Size:256 Owner:0x1ec2 +Seg:77f2 Size:256 Owner:0x1ea2 0 -Seg:78e3 Size:256 Owner:0x1ec4 +Seg:78f2 Size:256 Owner:0x1ea4 0 -Seg:79e3 Size:256 Owner:0x1ec6 +Seg:79f2 Size:256 Owner:0x1ea6 0 -Seg:7ae3 Size:256 Owner:0x1ec8 +Seg:7af2 Size:256 Owner:0x1ea8 0 -Seg:7be3 Size:256 Owner:0x1eca +Seg:7bf2 Size:256 Owner:0x1eaa 0 -Seg:7ce3 Size:256 Owner:0x1ecc +Seg:7cf2 Size:256 Owner:0x1eac 0 -Seg:7de3 Size:256 Owner:0x1ece +Seg:7df2 Size:256 Owner:0x1eae 0 -Seg:7ee3 Size:256 Owner:0x1ed0 +Seg:7ef2 Size:256 Owner:0x1eb0 0 -Seg:7fe3 Size:256 Owner:0x1ed2 +Seg:7ff2 Size:256 Owner:0x1eb2 0 -Seg:80e3 Size:256 Owner:0x1ed4 +Seg:80f2 Size:256 Owner:0x1eb4 0 -Seg:81e3 Size:256 Owner:0x1ed6 +Seg:81f2 Size:256 Owner:0x1eb6 0 -Seg:82e3 Size:256 Owner:0x1ed8 +Seg:82f2 Size:256 Owner:0x1eb8 0 -Seg:83e3 Size:256 Owner:0x1eda +Seg:83f2 Size:256 Owner:0x1eba 0 -Seg:84e3 Size:256 Owner:0x1edc +Seg:84f2 Size:256 Owner:0x1ebc 0 -Seg:85e3 Size:256 Owner:0x1ede +Seg:85f2 Size:256 Owner:0x1ebe 0 -Seg:86e3 Size:256 Owner:0x1ee0 +Seg:86f2 Size:256 Owner:0x1ec0 0 -Seg:87e3 Size:256 Owner:0x1ee2 +Seg:87f2 Size:256 Owner:0x1ec2 0 -Seg:88e3 Size:256 Owner:0x1ee4 +Seg:88f2 Size:256 Owner:0x1ec4 0 -Seg:89e3 Size:256 Owner:0x1ee6 +Seg:89f2 Size:256 Owner:0x1ec6 0 -Seg:8ae3 Size:256 Owner:0x1ee8 +Seg:8af2 Size:256 Owner:0x1ec8 0 -Seg:8be3 Size:273 Owner:0x5fec +Seg:8bf2 Size:273 Owner:0x5fcc 0000000000000000000000000000000000000000000000000000000000 -Seg:9ecd Size:24882 Owner:0x0 +Seg:9edc Size:24867 Owner:0x0  \ No newline at end of file diff --git a/HEAP.16B b/HEAP.16B new file mode 100755 index 00000000..48b0270d --- /dev/null +++ b/HEAP.16B @@ -0,0 +1,28 @@ + + == near == + + FREE block at 1733:0004 of size 528 + FREE block at 1754:0004 of size 64 + FREE block at 1758:0004 of size 35440 + FREE block at 1FFF:0004 of size 524288 +OK - end of heap + + == far == + + FREE block at 1733:0004 of size 528 + FREE block at 1754:0004 of size 64 + FREE block at 1758:0004 of size 35440 + FREE block at 1FFF:0004 of size 524288 +OK - end of heap + +---------------- -------- -------- -------- +Near 36032 0 0 +Far 36032 0 0 +---------------- -------- -------- -------- +HC_coreleft = 35436 +HC_farcoreleft = 0 +HC_GetNearFreeSize = 0 +HC_GetFarFreeSize = 0 +coreleft = 0 +farcoreleft = 0 +stackavail = 2828 diff --git a/HEAP.16W b/HEAP.16W index ec62ef3d..b0900f72 100755 --- a/HEAP.16W +++ b/HEAP.16W @@ -1,41 +1,41 @@ == near == - USED block at 16d8:f386 of size 12 - USED block at 16d8:f392 of size 322 - USED block at 16d8:f4d4 of size 52 - USED block at 16d8:f508 of size 20 - USED block at 16d8:f51c of size 20 - USED block at 16d8:f530 of size 20 - USED block at 16d8:f544 of size 20 - USED block at 16d8:f558 of size 20 - FREE block at 16d8:f56c of size 2704 + USED block at 16e7:f376 of size 12 + USED block at 16e7:f382 of size 322 + USED block at 16e7:f4c4 of size 52 + USED block at 16e7:f4f8 of size 20 + USED block at 16e7:f50c of size 20 + USED block at 16e7:f520 of size 20 + USED block at 16e7:f534 of size 20 + USED block at 16e7:f548 of size 20 + FREE block at 16e7:f55c of size 2720 OK - end of heap == far == - USED block at 26d9:0016 of size 136 - FREE block at 26d9:009e of size 32442 - USED block at 26d9:7f58 of size 20 - FREE block at 26d9:7f6c of size 32912 - FREE block at 36da:0016 of size 65510 - FREE block at 46db:0016 of size 65510 - FREE block at 56dc:0016 of size 65510 - FREE block at 66dd:0016 of size 65510 - FREE block at 76de:0016 of size 65510 - FREE block at 86df:0016 of size 65510 - FREE block at 96e0:0016 of size 32774 + USED block at 26e8:0016 of size 136 + USED block at 26e8:009e of size 32442 + USED block at 26e8:7f58 of size 20 + FREE block at 26e8:7f6c of size 32912 + FREE block at 36e9:0016 of size 65510 + FREE block at 46ea:0016 of size 65510 + FREE block at 56eb:0016 of size 65510 + FREE block at 66ec:0016 of size 65510 + FREE block at 76ed:0016 of size 65510 + FREE block at 86ee:0016 of size 65510 + FREE block at 96ef:0016 of size 32774 OK - end of heap Memory Type Total Used Free ---------------- -------- -------- -------- -Near 3190 486 2704 -Far 32592 156 32436 +Near 3206 486 2720 +Far 32592 32598 65530 ---------------- -------- -------- -------- -HC_coreleft = 2702 -HC_farcoreleft = 493872 -HC_GetNearFreeSize = 2704 -HC_GetFarFreeSize = 491188 -coreleft = 2702 -farcoreleft = 493872 -stackavail = 31498 +HC_coreleft = 2718 +HC_farcoreleft = 461448 +HC_GetNearFreeSize = 2720 +HC_GetFarFreeSize = 458746 +coreleft = 2718 +farcoreleft = 461448 +stackavail = 31454 diff --git a/MMDUMP.16B b/MMDUMP.16B index 6b662318..25aecaf1 100755 Binary files a/MMDUMP.16B and b/MMDUMP.16B differ diff --git a/MMDUMP.16W b/MMDUMP.16W index f9f91b32..54da92ef 100755 Binary files a/MMDUMP.16W and b/MMDUMP.16W differ diff --git a/bcexmm.exe b/bcexmm.exe index cb9f50b9..0f3aa08f 100755 Binary files a/bcexmm.exe and b/bcexmm.exe differ diff --git a/src/exmmtest.c b/src/exmmtest.c index 44a231d2..33790552 100755 --- a/src/exmmtest.c +++ b/src/exmmtest.c @@ -40,7 +40,8 @@ #define FILEREAD //#define EXMMVERBOSE //#define BUFFDUMPPAUSE -//#define EXMMVERBOSE__ +#define EXMMVERBOSE__ +//#define EXMMHEAPPTR // #define PRINTBBDUMP #define BUFFDUMP @@ -179,6 +180,11 @@ main(int argc, char *argv[]) printf("bakapee1[%s]\n", bakapee1); printf("bakapee2[%s]\n", bakapee2); + + #ifdef EXMMVERBOSE__ + printf("coreleft(): %u\n", coreleft()); + printf("farcoreleft(): %ld\n", farcoreleft()); + #endif KEYP #ifndef NOVID @@ -300,22 +306,19 @@ PRINTBB; KEYP DebugMemory_(&gvar, 1); MM_DumpData(&gvar); MM_Report_(&gvar); + HC_heapdump(&gvar); //printf("bakapee1=%s\n", bakapee1); //printf("bakapee2=%s\n", bakapee2); - MM_FreePtr(BBUFPTR, &gvar); - #ifndef NOVID - Shutdown16(&gvar); - #else //novid - ShutdownCAMMPM(&gvar); - #endif //NOVID - IN_Shutdown(&gvar); + printf("========================================\n"); + #ifdef EXMMHEAPPTR printf("near= %Fp ", gvar.mm.nearheap); printf("far= %Fp", gvar.mm.farheap); printf("\n"); printf("&near= %Fp ", &(gvar.mm.nearheap)); printf("&far= %Fp", &(gvar.mm.farheap)); printf("\n"); + #endif #ifdef EXMMVERBOSE printf("bigb= %Fp ", BBUF); //printf("bigbr= %04x", BBUF); @@ -324,19 +327,26 @@ PRINTBB; KEYP //printf("&bigb=%04x", BBUFPTR); printf("\n"); #endif - printf("========================================\n"); - #ifdef EXMMVERBOSE__ printf("coreleft(): %u\n", coreleft()); printf("farcoreleft(): %ld\n", farcoreleft()); #endif + printf("========================================\n"); + + MM_FreePtr(BBUFPTR, &gvar); + #ifndef NOVID + Shutdown16(&gvar); + #else //novid + ShutdownCAMMPM(&gvar); + #endif //NOVID + IN_Shutdown(&gvar); + #ifdef __WATCOMC__ //this is far printf("Total free: %lu\n", (dword)(HC_GetFreeSize())); //super buggy printf("HC_coreleft(): %u\n", HC_coreleft()); // printf("HC_farcoreleft(): %lu\n", (dword)HC_farcoreleft()); //printf("HC_GetNearFreeSize(): %u\n", HC_GetNearFreeSize()); //printf("HC_GetFarFreeSize(): %lu\n", (dword)HC_GetFarFreeSize()); - HC_heapdump(&gvar); // segatesuto(); #endif #ifdef __BORLANDC__ diff --git a/src/lib/16_ca.c b/src/lib/16_ca.c index 6580e239..cb8fe2f9 100755 --- a/src/lib/16_ca.c +++ b/src/lib/16_ca.c @@ -163,7 +163,7 @@ CASVT GRFILEPOS(int c, global_game_variables_t *gvar) } #endif -#define EXTENSION "hb1" +//#define EXTENSION "hb1" /* ============================================================================= @@ -1041,7 +1041,7 @@ void CAL_SetupGrFile (global_game_variables_t *gvar) // strcpy(fname,GDICTNAME); - strcat(fname,EXTENSION); + strcat(fname,"hb1"); if ((handle = open(fname, O_RDONLY | O_BINARY, S_IREAD)) == -1) @@ -1056,7 +1056,7 @@ void CAL_SetupGrFile (global_game_variables_t *gvar) MM_GetPtr (MEMPTRCONV gvar->ca.grstarts,(NUMCHUNKS+1)*FILEPOSSIZE, gvar); strcpy(fname,GHEADNAME); - strcat(fname,EXTENSION); + strcat(fname,"hb1"); if ((handle = open(fname, O_RDONLY | O_BINARY, S_IREAD)) == -1) @@ -1073,7 +1073,7 @@ void CAL_SetupGrFile (global_game_variables_t *gvar) // Open the graphics file, leaving it open until the game is finished // strcpy(fname,GFILENAME); - strcat(fname,EXTENSION); + strcat(fname,"hb1"); gvar->ca.file.grhandle = open(fname, O_RDONLY | O_BINARY); if (gvar->ca.file.grhandle == -1) diff --git a/src/lib/16_hc.c b/src/lib/16_hc.c index 1d6bd4cb..f7f5d524 100755 --- a/src/lib/16_hc.c +++ b/src/lib/16_hc.c @@ -70,48 +70,23 @@ HC_LargestFreeBlock(size_t* Size) #endif s0 = ~(size_t)0 ^ (~(size_t)0 >> 1); -#ifdef __BORLANDC__ - while (s0 && (p = malloc(s0)) == NULL) -#endif -#ifdef __WATCOMC__ while (s0 && (p = _nmalloc(s0)) == NULL) -#endif s0 >>= 1; if (p) -#ifdef __BORLANDC__ - free(p); -#endif -#ifdef __WATCOMC__ _nfree(p); -#endif s1 = s0 >> 1; while (s1) { -#ifdef __BORLANDC__ - if ((p = malloc(s0 + s1)) != NULL) -#endif -#ifdef __WATCOMC__ if ((p = _nmalloc(s0 + s1)) != NULL) -#endif { s0 += s1; -#ifdef __BORLANDC__ - free(p); -#endif -#ifdef __WATCOMC__ _nfree(p); -#endif } s1 >>= 1; } -#ifdef __BORLANDC__ - while (s0 && (p = malloc(s0)) == NULL) -#endif -#ifdef __WATCOMC__ while (s0 && (p = _nmalloc(s0)) == NULL) -#endif s0 ^= s0 & -s0; *Size = s0; @@ -131,12 +106,7 @@ size_t HC_coreleft(void) if (largest < sizeof(void __near*)) { if (p != NULL) -#ifdef __BORLANDC__ - free(p); -#endif -#ifdef __WATCOMC__ _nfree(p); -#endif break; } *(void __near* __near*)p = NULL; @@ -152,12 +122,7 @@ size_t HC_coreleft(void) while (pFirst != NULL) { void __near* p = *(void __near* __near*)pFirst; -#ifdef __BORLANDC__ - free(pFirst); -#endif -#ifdef __WATCOMC__ _nfree(pFirst); -#endif pFirst = p; } return total; @@ -228,7 +193,7 @@ unsigned long HC_farcoreleft(void) return total; } -#ifdef __WATCOMC__ +//==#ifdef __WATCOMC__ /*void huge* LargestHugeFreeBlock(size_t* Size) { size_t s0, s1; @@ -364,8 +329,8 @@ size_t _basedcoreleft(void) pFirst = p; } return total; -}*/ -#if 0 +} + size_t HC_GetFreeSize(void) { struct _heapinfo h_info; @@ -380,13 +345,34 @@ size_t HC_GetFreeSize(void) if((h_info._useflag == _USEDENTRY ? "USED" : "FREE")=="USED") h_used += h_info._size; h_total += h_info._size; } - HCL_heapstat0(heap_status); + HCL_heapstat(heap_status); return h_free; } -#endif +*/ + +void HCL_HeapWalking (struct _heapinfo *h_info, hc_use_t *hu, unsigned nearfarswitch) +{ + hu->h_free=0; hu->h_total=0; hu->h_used=0; + + h_info->_pentry = NULL; + for(;;) { + if(nearfarswitch==0) hu->heap_status = _nheapwalk( h_info ); + else if(nearfarswitch==1) hu->heap_status = _fheapwalk( h_info ); + if( hu->heap_status != _HEAPOK ) break; + if((h_info->_useflag == _USEDENTRY ? "USED" : "FREE")=="FREE") hu->h_free += h_info->_size; + if((h_info->_useflag == _USEDENTRY ? "USED" : "FREE")=="USED") hu->h_used += h_info->_size; + hu->h_total += h_info->_size; + } + HCL_heapstat(hu->heap_status); +} unsigned long HC_GetFarFreeSize(void) { + struct _heapinfo h_info; + hc_use_t hu; + HCL_HeapWalking (&h_info, &hu, 1); + return hu.h_free; +#if 0 struct _heapinfo fh_info; int heap_status; unsigned long fh_free=0, fh_total=0, fh_used=0; @@ -399,12 +385,18 @@ unsigned long HC_GetFarFreeSize(void) if((fh_info._useflag == _USEDENTRY ? "USED" : "FREE")=="USED") fh_used += fh_info._size; fh_total += fh_info._size; } - HCL_heapstat0(heap_status); + HCL_heapstat(heap_status); return fh_free; +#endif } size_t HC_GetNearFreeSize(void) { + struct _heapinfo h_info; + hc_use_t hu; + HCL_HeapWalking (&h_info, &hu, 0); + return hu.h_free; +#if 0 struct _heapinfo nh_info; int heap_status; size_t nh_free=0, nh_total=0, nh_used=0; @@ -417,8 +409,9 @@ size_t HC_GetNearFreeSize(void) if((nh_info._useflag == _USEDENTRY ? "USED" : "FREE")=="USED") nh_used += nh_info._size; nh_total += nh_info._size; } - HCL_heapstat0(heap_status); + HCL_heapstat(heap_status); return nh_free; +#endif } void HC_heapdump(global_game_variables_t *gvar) @@ -446,7 +439,7 @@ void HC_heapdump(global_game_variables_t *gvar) h_total += h_info._size; write(gvar->handle.heaphandle,scratch,strlen(scratch)); } - HCL_heapstat(gvar, heap_status, &scratch); + HCL_heapstatLogWrite(gvar, heap_status, scratch); #endif //near @@ -468,7 +461,7 @@ nh_info._pentry, nh_info._size );*/ nh_total += nh_info._size; write(gvar->handle.heaphandle,scratch,strlen(scratch)); } - HCL_heapstat(gvar, heap_status, &scratch); + HCL_heapstatLogWrite(gvar, heap_status, scratch); //far strcpy(scratch,"\n == far ==\n\n"); @@ -489,14 +482,16 @@ fh_info._pentry, fh_info._size );*/ fh_total += fh_info._size; write(gvar->handle.heaphandle,scratch,strlen(scratch)); } - HCL_heapstat(gvar, heap_status, &scratch); + HCL_heapstatLogWrite(gvar, heap_status, scratch); strcpy(scratch,"\n"); +#ifdef __WATCOMC__ strcat(scratch,kittengets(2,0,"Memory Type Total Used Free\n")); +#endif strcat(scratch,"---------------- -------- -------- --------\n"); // printmeminfoline(&scratch, "Default", h_total, h_used, h_free); - printmeminfoline(&scratch, "Near", nh_total, nh_used, nh_free); - printmeminfoline(&scratch, "Far", fh_total, fh_used, fh_free); + printmeminfoline(scratch, "Near", nh_total, nh_used, nh_free); + printmeminfoline(scratch, "Far", fh_total, fh_used, fh_free); strcat(scratch,"---------------- -------- -------- --------\n"); strcat(scratch,"HC_coreleft = "); ultoa((dword)HC_coreleft(),str,10); strcat(scratch,str); strcat(scratch,"\n"); strcat(scratch,"HC_farcoreleft = "); ultoa((dword)HC_farcoreleft(),str,10); strcat(scratch,str); strcat(scratch,"\n"); @@ -511,7 +506,7 @@ fh_info._pentry, fh_info._size );*/ HC_CloseDebug(gvar); } -void HCL_heapstat(global_game_variables_t *gvar, int heap_status, byte *str) +void HCL_heapstatLogWrite(global_game_variables_t *gvar, int heap_status, byte *str) { switch( heap_status ) { case _HEAPEND: @@ -524,16 +519,18 @@ void HCL_heapstat(global_game_variables_t *gvar, int heap_status, byte *str) case _HEAPBADBEGIN: strcpy((str),"ERROR - heap is damaged\n"); break; +#ifdef __WATCOMC__ case _HEAPBADPTR: strcpy((str),"ERROR - bad pointer to heap\n"); break; +#endif case _HEAPBADNODE: strcpy((str),"ERROR - bad node in heap\n"); } write(gvar->handle.heaphandle,(str),strlen((str))); } -void HCL_heapstat0(int heap_status) +void HCL_heapstat(int heap_status) { switch( heap_status ) { case _HEAPEND: @@ -545,14 +542,18 @@ void HCL_heapstat0(int heap_status) case _HEAPBADBEGIN: printf("ERROR - heap is damaged\n"); break; +#ifdef __WATCOMC__ case _HEAPBADPTR: printf("ERROR - bad pointer to heap\n"); break; +#endif case _HEAPBADNODE: printf("ERROR - bad node in heap\n"); } } +//++ +#ifdef __WATCOMC__ unsigned long farcoreleft() { //---- _fheapgrow(); diff --git a/src/lib/16_hc.h b/src/lib/16_hc.h index d9f18c83..698e0093 100755 --- a/src/lib/16_hc.h +++ b/src/lib/16_hc.h @@ -28,6 +28,27 @@ #include "src/lib/16_head.h" +typedef struct heapusage +{ + unsigned long h_free, h_total, h_used; + int heap_status; +} hc_use_t; + +#ifdef __BORLANDC__ +#if 0 +/*typedef */struct _heapinfo +{ + int _far *_pentry; //- heap entry pointer + size_t _size; //- size of heap entry + int _useflag; //- entry in use return value +};// _heapinfo_t; +#endif + +#define _HEAPBADBEGIN 2 /* heap header is corrupted */ +#define _HEAPBADNODE 3 /* heap entry is corrupted */ +#define _HEAPBADPTR 5 /* invalid heap entry pointer (_heapwalk) */ +#endif + //long HC_Newfarcoreleft(); #ifdef __BORLANDC__ void * HC_LargestFreeBlock(size_t* Size); @@ -43,8 +64,8 @@ unsigned long HC_GetFarFreeSize(void); size_t HC_GetNearFreeSize(void); void HC_heapdump(global_game_variables_t *gvar); -void HCL_heapstat(global_game_variables_t *gvar, int heap_status, byte *str); -void HCL_heapstat0(int heap_status); +void HCL_heapstatLogWrite(global_game_variables_t *gvar, int heap_status, byte *str); +void HCL_heapstat(int heap_status); void HC_OpenDebug(global_game_variables_t *gvar); void HC_CloseDebug(global_game_variables_t *gvar); diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index 333c3686..dcb8d86f 100755 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -884,7 +884,7 @@ void MM_Startup (global_game_variables_t *gvar) // get all available near conventional memory segments // length=coreleft(); - start = (void far *)(gvar->mm.nearheap = nearmalloc(length)); + start = (void far *)(gvar->mm.nearheap = _nmalloc(length)); length -= 16-(FP_OFF(start)&15); length -= SAVENEARHEAP; @@ -976,12 +976,7 @@ void MM_Shutdown (global_game_variables_t *gvar) return; _ffree(gvar->mm.farheap);// printf(" far freed\n"); -#ifdef __WATCOMC__ _nfree(gvar->mm.nearheap);// printf(" near freed\n"); -#endif -#ifdef __BORLANDC__ - free(gvar->mm.nearheap);// printf(" near freed\n"); -#endif #ifndef __16_PM__ #if 0 #ifdef __DEBUG__ @@ -1477,7 +1472,9 @@ void MM_ShowMemory (global_game_variables_t *gvar) strcat (scratch,"\n"); write(gvar->handle.debughandle,scratch,strlen(scratch)); write(gvar->handle.debughandle,scratch0,strlen(scratch0)); -//fprintf(stdout, "%s", scratch); +//0000fprintf(stdout, "\n[%s]", scratch); +//0000fprintf(stdout, "[\n%s\n]", scratch0); +//0000fprintf(stdout, "[%u]\n", q); scan = scan->next; q++; @@ -1541,12 +1538,12 @@ void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword boolean done; ScanCode scancode; int xpos,ypos; - word qq, ccolor = 3; + word ccolor = 3; IN_Ack(gvar); // VL_ClearVideo (8); - for (qq = 0,done = false;!done;) + for (q = 0,done = false;!done;) { - if(scaninfo[qq].scan->attributes & PURGEBITS) + if(scaninfo[q].scan->attributes & PURGEBITS) { ccolor = 6; // dark purple = purgable strcpy(scratch1, AAMAGENTA); // dark purple = purgable @@ -1556,13 +1553,13 @@ void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword strcpy(scratch1, AABLUE); // medium blue = non purgable //printf("%s", AABLUE); } - if(scaninfo[qq].scan->attributes & LOCKBIT) + if(scaninfo[q].scan->attributes & LOCKBIT) { ccolor = 1; // red = locked strcpy(scratch1, AARED); // red = locked //printf("%s", AARED); } - end = scaninfo[qq].scan->length-1; + end = scaninfo[q].scan->length-1; /*typedef struct mmblockstruct{ word start,length; unsigned attributes; @@ -1579,19 +1576,19 @@ void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword }else #endif clrscr(); - sprintf(global_temp_status_text, "block #%04u", qq); MMSMPRINTMEMINFO -// sprintf(global_temp_status_text, "%Fp", scaninfo[qq].scan->useptr); MMSMPRINTMEMINFO - sprintf(global_temp_status_text, "start: %04x", (unsigned)scaninfo[qq].scan->start); MMSMPRINTMEMINFO - sprintf(global_temp_status_text, "useptr: %04x", (unsigned)scaninfo[qq].scan->useptr); MMSMPRINTMEMINFO - sprintf(global_temp_status_text, "size: %05u", (unsigned)scaninfo[qq].scan->length); MMSMPRINTMEMINFO - if (scaninfo[qq].scan->next && scaninfo[qq].scan->next->start > end+1) + sprintf(global_temp_status_text, "block #%04u", q); MMSMPRINTMEMINFO +// sprintf(global_temp_status_text, "%Fp", scaninfo[q].scan->useptr); MMSMPRINTMEMINFO + sprintf(global_temp_status_text, "start: %04x", (unsigned)scaninfo[q].scan->start); MMSMPRINTMEMINFO + sprintf(global_temp_status_text, "useptr: %04x", (unsigned)scaninfo[q].scan->useptr); MMSMPRINTMEMINFO + sprintf(global_temp_status_text, "size: %05u", (unsigned)scaninfo[q].scan->length); MMSMPRINTMEMINFO + if (scaninfo[q].scan->next && scaninfo[q].scan->next->start > end+1) { - sprintf(global_temp_status_text, "free: %05u", (unsigned)(scaninfo[qq].scan->next->start-scaninfo[qq].scan->start)); MMSMPRINTMEMINFO + sprintf(global_temp_status_text, "free: %05u", (unsigned)(scaninfo[q].scan->next->start-scaninfo[q].scan->start)); MMSMPRINTMEMINFO } if(gvar->video.VL_Started) { - y = ypos;//scaninfo[qq].scan->start/width; - x = xpos;//scaninfo[qq].scan->start%width; + y = ypos;//scaninfo[q].scan->start/width; + x = xpos;//scaninfo[q].scan->start%width; VW_Hlin(x,x+end,y,ccolor,gvar); VL_Plot(x,y,5,gvar); } @@ -1599,8 +1596,8 @@ void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword { printf("%s", scratch1); printf("%s", AAGREY); printf("_"); - if(scaninfo[qq].scan->length<64000) - for(w=(scaninfo[qq].scan->start)/80;w<=end/80;w++) + if(scaninfo[q].scan->length<64000) + for(w=(scaninfo[q].scan->start)/80;w<=end/80;w++) { //strcat(scratch1, "+"); printf("+"); @@ -1608,18 +1605,18 @@ void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword } - if (scaninfo[qq].scan->next && scaninfo[qq].scan->next->start > end+1) if(!gvar->video.VL_Started) + if (scaninfo[q].scan->next && scaninfo[q].scan->next->start > end+1) if(!gvar->video.VL_Started) { //strcat(scratch1, AARESET); printf("%s", AARESET); //strcat(scratch1,AAGREEN); printf("%s", AAGREEN); - for(w=(end+1)/80;w<=((scaninfo[qq].scan->next->start-scaninfo[qq].scan->start)/80);w++) + for(w=(end+1)/80;w<=((scaninfo[q].scan->next->start-scaninfo[q].scan->start)/80);w++) { //strcat(scratch1,"0"); printf("0"); } - }else VW_Hlin(x+end+1,x+(scaninfo[qq].scan->next->start-scaninfo[qq].scan->start),y,3,gvar); // black = free//now green + }else VW_Hlin(x+end+1,x+(scaninfo[q].scan->next->start-scaninfo[q].scan->start),y,3,gvar); // black = free//now green if(gvar->video.VL_Started) @@ -1634,27 +1631,28 @@ void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword printf("%s", AARESET); printf("\n"); } +//0000 fprintf(stdout, "q=%u maxq=%u\n", q, maxq); while (!(scancode = gvar->in.inst->LastScan)){} IN_ClearKey(scancode); switch (scancode) { case sc_LeftArrow: - if(qq>0) qq--; - else qq = maxq; + if(q>0) q--; + else q = maxq; break; case sc_RightArrow: - if(qq0) qq-=100; - else qq = maxq; + case sc_UpArrow: + if(q>10) q-=10; + else q = maxq; break; case sc_DownArrow: - if(qqmm.nearheap); -#endif -#ifdef __BORLANDC__ - free(gvar->mm.nearheap); -#endif dumpfile = fopen (gvar->handle.datadumpfilename, "w"); if (!dumpfile) Quit (gvar, "MM_DumpData: Couldn't open MMDUMP.16!\n"); diff --git a/src/lib/16_t.h b/src/lib/16_t.h index 2b573262..de709bdf 100755 --- a/src/lib/16_t.h +++ b/src/lib/16_t.h @@ -70,8 +70,17 @@ typedef void _seg * memptr; //#define OBTPTRANDPERCONV & //#define SDTPTRANDPERCONV & -#define nearmalloc malloc -#define nearfree free +#define _nmalloc malloc +#define _nfree free + +#define _nheapwalk heapwalk +#define _fheapwalk farheapwalk + +//heapinfo vars +#define _heapinfo heapinfo +#define _pentry ptr +#define _size size +#define _useflag in_use #endif //