needs tests/harness mem/scratch testbegin 16 newscratchpad dup @ const scbuf dup bindalloc[ sc[ dup bindrun1 sc1 dup bindrun1r sc1r bindrun1@ sc1@ \test sc1 newhere 16 #eq scbuf #eq \test variable refhere here refhere ! sc[ 3 allot@ ]alloc scbuf #eq \test here refhere @ #eq \test :~ 8 sc1@ allot ; ~ scbuf 4 + #eq \test The next call will make the pad rewind :~ 8 reserve $1234 , ; sc1 ~ scbuf @ $1234 #eq \test bindrun1@ in newhere cases \ at that point, we're at scbuf+4 16 sc1@ allot scbuf #eq \test bindrun1@ in newhere cases in compile mode \ at that point, we're at scbuf+0 12 sc1@ allot scbuf #eq \ at that point, we're at scbuf+12 :~ 8 sc1@ allot ; ~ scbuf #eq \test contiguity check \ at that point, we are at scbuf+0 12 sc1@ allot scbuf #eq \ at that point, we're at scbuf+12 :~ here 1 , 2 , ; expectabort sc1r ~ testend