[comp.os.os2.programmer] WinAllocHeap

ejp@bohra.cpg.oz.au (Esmond Pitt) (04/24/91)

I'm trying to use WinAllocHeap(), WinAllocMem() and friends, in large
memory model. I want to use HM_MOVEABLE, mainly because I don't want to
remember allocation sizes but also because I want maximum compaction to
occur. This also commits me to using back pointers, SETMEMBACKPTR(),
etc. OK. So far so good.

I allocate area 1, then I allocate area 2 whose back pointer is inside
area 1. After various operations area 1 gets moved around, then after a
few more operations area 2 gets moved.

My question is, will the back pointer to area 2 inside area 1 be
correctly updated, even though it has moved?

It's not stated in the documentation that the heap primitives will do
this, yet if they don't the whole system is next to useless.

Thanks for any assistance or information.

-- 
Esmond Pitt, Computer Power Group
ejp@bohra.cpg.oz