Bloat EXE Macro, bloat your exe

Share your advanced PureBasic knowledge/code with the community.
thanos
Enthusiast
Enthusiast
Posts: 422
Joined: Sat Jan 12, 2008 3:25 pm
Location: Greece
Contact:

Re: Bloat EXE Macro, bloat your exe

Post by thanos »

SFSxOI wrote:BTW, there is also another way to put bloat into a program without really putting bloat in to affect the memory footprint. You create an empty .txt file of the size you choose and simply include it in your program. There is code in the forum for producing empty .txt files of any size that you choose. Its more precise then guessing that 100000 = nearly 400kbyte as you can choose the exact size. Plus it doesn't affect the memory footprint as long as the .txt file is really empty becauzse there is no data in the .txt to allocate memory too.
Hi to all.
I did the bloating trick by including a bitmap image at the end of the executable file.
Does this technique affects the memory?
Empty .txt file: do you mean a text file which include a sequence of null characters?
Regards.

Thanos
» myPersonal Banker :: Because you do not need to have a master degree in economics in order to organize your finances!
ricardo
Addict
Addict
Posts: 2402
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: Bloat EXE Macro, bloat your exe

Post by ricardo »

SFSxOI wrote: In relation to the post about the furniture; the reason the weight seems to affect sales is because people have the economic/financial implied concept that weight in certain items means solid in a sturdy and long lasting context.
Also. maybe because when using only natural materials, usually the more durable or stronger have more weight.
Now, with artifical materials its not always in that way, but in the mind of the people the idea persists.
SFSxOI wrote:Plus it doesn't affect the memory footprint as long as the .txt file is really empty becauzse there is no data in the .txt to allocate memory too.
Are you sure about the memory footprint?
Im not trying to say i think you are wrong, im really asking.
ARGENTINA WORLD CHAMPION
dell_jockey
Enthusiast
Enthusiast
Posts: 767
Joined: Sat Jan 24, 2004 6:56 pm

Re: Bloat EXE Macro, bloat your exe

Post by dell_jockey »

Oops, my tongue in cheek remark apparently struck a chord... I'm sorry about that.... :mrgreen:
cheers,
dell_jockey
________
http://blog.forex-trading-ideas.com
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Re: Bloat EXE Macro, bloat your exe

Post by SFSxOI »

ricardo wrote:
SFSxOI wrote:Plus it doesn't affect the memory footprint as long as the .txt file is really empty becauzse there is no data in the .txt to allocate memory too.
Are you sure about the memory footprint?
Im not trying to say i think you are wrong, im really asking.
Awww...thats ok, i've been wrong before and its probably not the last time either. :)

Anyway..i've not noticed any effect on the memory foot print of an app with an included empty text file. Its not something i'm really interested in but i did take a look once just experimenting.I didn't do a lot of in depth testing, I loaded up the app without the included .txt and looked at the memory size occupied, then i loaded up the app with an included 200 MB .txt and didn't see any difference in the memory size occupied. On the drive of course the correct file size was reported for both the app with and without the included .txt file. The apps were exactly the same with the exception of the one with the included .txt.
The advantage of a 64 bit operating system over a 32 bit operating system comes down to only being twice the headache.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8422
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Bloat EXE Macro, bloat your exe

Post by netmaestro »

Thanks Rings, this gives me a great idea! I can just stuff a sock down my pants and... disco here I come! :mrgreen:
BERESHEIT
dell_jockey
Enthusiast
Enthusiast
Posts: 767
Joined: Sat Jan 24, 2004 6:56 pm

Re: Bloat EXE Macro, bloat your exe

Post by dell_jockey »

netmaestro wrote:Thanks Rings, this gives me a great idea! I can just stuff a sock down my pants and... disco here I come! :mrgreen:
and come disclosure time.... :oops:
cheers,
dell_jockey
________
http://blog.forex-trading-ideas.com
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8422
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Bloat EXE Macro, bloat your exe

Post by netmaestro »

Aw, the twins'll be wasted by then!
BERESHEIT
thanos
Enthusiast
Enthusiast
Posts: 422
Joined: Sat Jan 12, 2008 3:25 pm
Location: Greece
Contact:

Re: Bloat EXE Macro, bloat your exe

Post by thanos »

SFSxOI wrote:BTW, there is also another way to put bloat into a program without really putting bloat in to affect the memory footprint. You create an empty .txt file of the size you choose and simply include it in your program. There is code in the forum for producing empty .txt files of any size that you choose. Its more precise then guessing that 100000 = nearly 400kbyte as you can choose the exact size. Plus it doesn't affect the memory footprint as long as the .txt file is really empty becauzse there is no data in the .txt to allocate memory too.
Hi to all.
I did the bloating trick by including a bitmap image at the end of the executable file.
Does this technique affects the memory?
Empty .txt file: do you mean a text file which include a sequence of null characters?
An empty file does not really affects the memory?
Regards.

Thanos
» myPersonal Banker :: Because you do not need to have a master degree in economics in order to organize your finances!
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Re: Bloat EXE Macro, bloat your exe

Post by SFSxOI »

thanos wrote:
SFSxOI wrote:BTW, there is also another way to put bloat into a program without really putting bloat in to affect the memory footprint. You create an empty .txt file of the size you choose and simply include it in your program. There is code in the forum for producing empty .txt files of any size that you choose. Its more precise then guessing that 100000 = nearly 400kbyte as you can choose the exact size. Plus it doesn't affect the memory footprint as long as the .txt file is really empty becauzse there is no data in the .txt to allocate memory too.
Hi to all.
I did the bloating trick by including a bitmap image at the end of the executable file.
Does this technique affects the memory?
Empty .txt file: do you mean a text file which include a sequence of null characters?
An empty file does not really affects the memory?
Regards.

Thanos
I'm sorry Thanos, I intended to answer you earlier but got distracted. The .txt file was just empty, did not contain anything at all. I guess its possible that it could contain a sequence of null characters but i could'nt find anything in it. Its a little snippet of code i picked up here in the forums, i'm sure I saved it somewhere in my colletion of snippets. Tell you what, as soon as I get home today from work i'll dig it out an post it for you. I didn't see any effect on the memory space size occupied when it was included in an app. Like I said above in another post; I didn't do any real in depth testing as its something i'm not really interested in, it was mostly a curiousity thing, but I could not tell any difference in the memory space size occupied between the empty .txt being included or not included. I guess its possible for there to be some effect, but just looking at the size occupied I couldn't really see any difference in memory but on the hard drive the size was as expected (according to how big the empty .txt file was).

EDIT: Oh wait, it wasn't code in the forum after all actually, well it was as I got the idea for the use from some code in the forum as I had never used that particular PB function before at the time, I just used CreateSizedFile(wrte_file_dir$,size); where write_file_dir$ = the full path to the file your going to create (i.e...C:\file.txt or C:\file.bin) and the 'size' is the file size (see the PureBasic help for info). Then I included as binary in the test.exe file.
Last edited by SFSxOI on Fri Sep 18, 2009 9:53 am, edited 5 times in total.
The advantage of a 64 bit operating system over a 32 bit operating system comes down to only being twice the headache.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Bloat EXE Macro, bloat your exe

Post by PB »

> I did the bloating trick by including a bitmap image at the end of the executable file.
> Does this technique affects the memory?

No. I tested this just now. My exe is 749 KB in size and used 19524 KB of memory when running.
I then IncludeBinary'ed a 3.52 MB JPEG file to it, and re-compiled the exe. The executable was now
4.25 MB in size and using 19508 KB when run. So, no difference. (Don't know why it's less; probably
a runtime thing where an image didn't get loaded or something).
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
GeBonet
Enthusiast
Enthusiast
Posts: 135
Joined: Fri Apr 04, 2008 6:20 pm
Location: Belgium

Re: Bloat EXE Macro, bloat your exe

Post by GeBonet »

Hello,
He has 30 years ago (1979) ... I lost a sale of a personal computer (+/- the today PC) for professional use and price = 4000 Euros (at this time), because the client did not think it could exist at least 50000 Euros ! He wanted a big thing ... A computer with a computer prices !
And it is unfortunately also true.... With your story, As I see the human spirits have not really followed the technology :?
Sorry for my english :wink: ! (Windows Xp, Vista and Windows 7, Windows 10)
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4326
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Re: Bloat EXE Macro, bloat your exe

Post by Rook Zimbabwe »

???? :?: :shock:
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
Post Reply