MCPcopy Create free account
hub / github.com/GJDuck/e9patch / makePadding

Function makePadding

src/e9patch/e9json.cpp:690–704  ·  view source on GitHub ↗

* Make padding. */

Source from the content-addressed store, hash-verified

688 * Make padding.
689 */
690Trampoline *makePadding(size_t len)
691{
692 if (len == 0)
693 return nullptr;
694 size_t num_entries = 1;
695 uint8_t *ptr =
696 new uint8_t[sizeof(Trampoline) + num_entries * sizeof(Entry)];
697 Trampoline *T = (Trampoline *)ptr;
698 T->prot = PROT_READ | PROT_EXEC;
699 T->num_entries = num_entries;
700 T->preload = false;
701 T->entries[0] = makeZeroesEntry(len);
702
703 return T;
704}
705
706/*
707 * Convert an integer.

Callers 1

parseReserveFunction · 0.85

Calls 1

makeZeroesEntryFunction · 0.85

Tested by

no test coverage detected