Lines Matching defs:head
154 // wrapper, in this case we need to keep the leading 5+ bytes ('head')
155 // of the original code somewhere with a "jmp <old_func+head>".
156 // We call these 'head'+5 bytes of instructions a "trampoline".
160 size_t head = 5;
163 // to the trampoline and store it in 'head'.
164 head = RoundUpToInstrBoundary(head, old_bytes);
165 if (!head)
169 char *trampoline = GetMemoryForTrampoline(head + 5);
172 _memcpy(trampoline, old_bytes, head);
173 WriteJumpInstruction(trampoline + head, old_bytes + head);
182 if (!VirtualProtect((void *)old_bytes, head, PAGE_EXECUTE_READWRITE,
187 _memset(old_bytes + 5, 0xCC /* int 3 */, head - 5);
190 if (!VirtualProtect((void *)old_bytes, head, old_prot, &unused_prot))