I know that Linux supports the mmap system command for being able to define a block of executable memory. How do you do the same thing in windows? I imagine there i
Call CreateFileMapping or VirtualProtect or VirtualAlloc passing one of the PAGE_EXECUTE_XXX protection flags. The mmap function is used for file mappings and so CreateFileMapping is the closest Windows analogue.