I am looking find out the ways to creat in code segement size should be 16 mb (c++ byte code size is 16 MB)
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Copy and paste 16MB of nop instruction in __asm{} in a function . And dont use that function. Each nop must be 1-Byte. Then you will have the thing. Dynamically code-changing mechanisms you will need then.
You will copy 1 nop into the 2 nops. then copy 2 nops into 4 nops. untill you do this for 24 times(24 bit equals 16 million differents am i right?)
i was forgetting to tell you that you need to disable some optimizations for that. Or you can just use digital mars all optimizations turned off.
Suggest you to do this in a separate file.(maybe include )
If you want the linking be quicker, you should make it 16-Byte aligned.
Sample of main_program.cpp
Sample of your_16MB_nop