Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Most efficient block size for ReadProcessMemory?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
HalfPrime
Grandmaster Cheater
Reputation: 0

Joined: 12 Mar 2008
Posts: 532
Location: Right there...On your monitor

PostPosted: Sun Jun 01, 2008 4:07 pm    Post subject: Most efficient block size for ReadProcessMemory? Reply with quote

Say I've got a game that takes 6 megs in memory. What would be the best size to read it at? I know the bigger the better because you shouldn't call that API a million times, but I dont know if I should read all 6 megs at once, either. I was thinking 500K-1M at a time, but I have no idea.
_________________
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8585
Location: 127.0.0.1

PostPosted: Sun Jun 01, 2008 4:14 pm    Post subject: Reply with quote

Uh.. what do you need to read for? Care to be a bit more specific on the actual purpose? Surprised
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
HalfPrime
Grandmaster Cheater
Reputation: 0

Joined: 12 Mar 2008
Posts: 532
Location: Right there...On your monitor

PostPosted: Sun Jun 01, 2008 4:17 pm    Post subject: Reply with quote

Trying to make a CE type thing in C++
_________________
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8585
Location: 127.0.0.1

PostPosted: Sun Jun 01, 2008 4:32 pm    Post subject: Reply with quote

Dump in parts based on the memory regions? Would be more efficient I would say to scan chunks inside threads. Just my suggestion, I'm sure others will follow with their own.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
HalfPrime
Grandmaster Cheater
Reputation: 0

Joined: 12 Mar 2008
Posts: 532
Location: Right there...On your monitor

PostPosted: Sun Jun 01, 2008 4:34 pm    Post subject: Reply with quote

rofl, hivemind. I just finished up my EnumProcessModules code. But the problem is, some of the modules are huge and I don't know if I should read the entire module or break it up.
_________________
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8585
Location: 127.0.0.1

PostPosted: Sun Jun 01, 2008 4:40 pm    Post subject: Reply with quote

Dumping a full module doesn't really take that long. I use my sigScan DLL for a prog that dumps a 2.5MB DLL from memory to scan for signatures and it can complete the task for all of the signatures I scan for within about 1-2 seconds. (It's not programmed for efficiency either as it dumps each time it scans for a new signature.)

I wouldn't think it would be an issue for anything bigger either. Of course the bigger the DLL the more space and such will be needed and speed will start to be effected but I would say it would probably be fine.

Just test it out and see how it performs with the full dumps, if not, then possibly divide into chunks based on the size.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
HalfPrime
Grandmaster Cheater
Reputation: 0

Joined: 12 Mar 2008
Posts: 532
Location: Right there...On your monitor

PostPosted: Sun Jun 01, 2008 4:58 pm    Post subject: Reply with quote

Alright, I'll try different sizes. I was mostly worried about an effect on speed when my program has 6 megs allocated to it.
_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites