#define XERR "memoryaccess"
#include "memoryaccess.ih"

// extending continues in the current process's memory area, so 
// pointers to the data blocks remain valid. The current MemoryAccess object
// is killed, but not its connected data block: the connected data block can
// be used by the extended MemoryAccess object.

    // by memorybridge/extend.f

// static
MemoryAccess *MemoryAccess::extend(size_t offset, MemoryAccess *oldPtr)
{
//xerr("offset: " << offset);

    MemoryAccess *newPtr = oldPtr->refresh(offset);

//xerr("removing OLD ID " << oldPtr->d_id);
    killID(oldPtr->d_id);

    return newPtr;
}
