John Elliott wondered why the GlobalWire
function was called GlobalWire
.
First, some background for those who never had to write 16-bit Windows programs. The GlobalWire
function was similar to the 16-bit GlobalLock
function, except that it had the bonus feature of relocating the memory to the lowest available linear address. You used this function as a courtesy if you intended to leave the memory locked for a long time. Moving it to the edge of the address space means that it is unlikely to become an obstacle in the middle of the address space which would otherwise prevent future large memory allocations from succeeding.
But why “wire”?
This employs a colloquial sense of the word “wire” as a verb which has lost its currency in the intervening years. To wire means to fasten securely in a very strong sense. It probably derives from the phrase “hard-wired”, which means “permanently attached in circuitry”. Therefore, “wiring” memory into place ensures that it doesn’t move around.
0 comments