Recognizing Block boundaries
. If block size is fixed then position information can be used
. Otherwise keep size information to determine the block boundaries
Whether Block is in Use
. References may occur through a pointer or a sequence of pointers
. Compiler needs to know position of all the pointers in the storage
. Pointers are kept in fixed positions and user area does not contain any pointers
While the user program deals with pointers individually, for allocation and de-allocation by the run-time system action must be taken at the level of blocks. That is, a block can be de-allocated only when no pointers are pointing to it. For this, for any pointer we have to keep track of what blocks are being referenced by it. Here we must note that a block can be pointed to differently by a pointer, or the pointer can point to some other pointer, which then points to the block, and so on. For ease in keeping track of this, pointers are kept in fixed positions and the user area does not contain any pointers.
|