ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Sat Sep 19, 2020 9:32 am

All times are UTC




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Working with MEMORY_FILE
PostPosted: Wed Sep 16, 2020 2:26 pm 

Joined: Wed Sep 16, 2020 2:08 pm
Posts: 3
Hello, i was trying to write some code that uses MEMORY_FILE as a buffer and write that buffer to the output file, clear it and use it again and again. I was trying to clear MEMORY_FILE after each write, didn't found any info regarding how to do (maybe it's not possible, don't know).
Could somebody give some help?


Top
   
PostPosted: Wed Sep 16, 2020 6:35 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11452
log MEMORY_FILE 0 0


Top
   
PostPosted: Wed Sep 16, 2020 7:00 pm 

Joined: Wed Sep 16, 2020 2:08 pm
Posts: 3
aluigi wrote:
log MEMORY_FILE 0 0

Thank you for the reply, that's what i've tried for first. The strange thing is that the memory_file size keep increasing, seems the command has no effect.


Top
   
PostPosted: Wed Sep 16, 2020 7:12 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11452
Are you sure you don't have the "append" mode left enabled?

The size of the MEMORY_FILE in memory is not touched after reset because it's left as buffer for possible future operations, in this case it improves the performances by avoiding to reallocate it multiple times.
So if you still see quickbms.exe keeping lot of memory after "log MEMORY_FILE 0 0" that's normal :)


Top
   
PostPosted: Wed Sep 16, 2020 7:19 pm 

Joined: Wed Sep 16, 2020 2:08 pm
Posts: 3
aluigi wrote:
Are you sure you don't have the "append" mode left enabled?

The size of the MEMORY_FILE in memory is not touched after reset because it's left as buffer for possible future operations, in this case it improves the performances by avoiding to reallocate it multiple times.
So if you still see quickbms.exe keeping lot of memory after "log MEMORY_FILE 0 0" that's normal :)


Now that you mentioned, i think i've used append at the beggining, let me check. Thank you, you did a great tool man!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC


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 post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited