@pacmaninbw we don't know for sure since the OP hasn't replied but the implementation of
malloc
does look a bit different than the code in the referenced SO post (other than the last two lines) and also drastically different than the code in
the other SO post mentioned within the second commented line at the start of
memory.cpp