n. 1. A sequence of one or more distinguished (out-of-band) characters (or other data items), used to delimit a piece of data intended to be treated as a unit (the computer-science literature calls this a 'sentinel'). The NUL (ASCII 0000000) character that terminates strings in C is a fence. Hex FF is probably the most common fence character after NUL.
2. [among users of optimizing compilers] Any technique, usually exploiting knowledge about the compiler, that blocks certain optimizations. Used when explicit mechanisms are not available or are overkill. Typically a hack: "I call a dummy procedure there to force a flush of the optimizer's register-coloring info" can be expressed by the shorter "That's a fence procedure".