top: restore missing support for 'MEMGRAPH_OLD' define

When support for graphs was refactored, in that commit
referenced below, the logic for our 'MEMGRAPH_OLD' was
lost while the #define itself remained in the .h file.

Faced with deleting the #define or restoring the logic
I chose the latter. Thus, if one wanted to be reminded
how overstated 'used' memory once was, it can be done.

Reference(s):
. Sep, 2022 - refactored graph support
commit 2d5b51d1a2

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2022-10-12 00:00:00 -05:00 committed by Craig Small
parent 244f2b33f2
commit 57774f0332

View File

@ -6571,12 +6571,15 @@ static void do_memory (void) {
my_qued = MEM_VAL(mem_BUF) + MEM_VAL(mem_QUE);
if (Curwin->rc.graph_mems) {
my_misc = MEM_VAL(mem_TOT) - MEM_VAL(mem_FRE) - my_qued;
my_used = MEM_VAL(mem_TOT) - MEM_VAL(mem_AVL) - my_misc;
my_used = MEM_VAL(mem_TOT) - MEM_VAL(mem_FRE) - my_qued;
#ifdef MEMGRAPH_OLD
my_misc = my_qued;
#else
my_misc = MEM_VAL(mem_TOT) - MEM_VAL(mem_AVL) - my_used;
#endif
Graph_mems->total = MEM_VAL(mem_TOT);
Graph_mems->part1 = my_misc;
Graph_mems->part2 = my_used;
Graph_mems->part1 = my_used;
Graph_mems->part2 = my_misc;
rx = sum_rx(Graph_mems);
#ifdef TOG4_MEM_1UP
prT(bfT(0), mkM(MEM_VAL(mem_TOT)));