flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Why does FASM use so much memory?

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17669
Location: In your JS exploiting you and your system
revolution
windwakr wrote:
For my test I used a brand new download of "fasm.exe" out of "flat assembler 1.68 for DOS". Wouldn't that fall under the category of "fasm for DOS and for Win32 console"? So, why did it only allocate 15MB?
DOS != Win32 console
Post 02 Sep 2009, 05:22
View user's profile Send private message Visit poster's website Reply with quote
windwakr



Joined: 30 Jun 2004
Posts: 827
Location: Michigan, USA
windwakr
He said
"both fasm for DOS and for Win32 console use the amount based on what is available by default."
What is "fasm.exe" out of "flat assembler 1.68 for DOS" then?

_________________
----> * <---- My star, won HERE
Post 02 Sep 2009, 05:25
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17669
Location: In your JS exploiting you and your system
revolution
Your settings for the DOS emulator (NTVDM) will dictate how much memory is available to DOS programs.

Win32 console is a 32bit process and can directly query the API for memory availability.
Post 02 Sep 2009, 05:28
View user's profile Send private message Visit poster's website Reply with quote
windwakr



Joined: 30 Jun 2004
Posts: 827
Location: Michigan, USA
windwakr
Ah, I see. Didn't know the DOS emulated programs didn't have access to all the memory.

Here's the output on the Win32 console one:
Code:
[BLAH] >fasm test.asm
flat assembler  version 1.68  (1110194 kilobytes memory)
1 passes, 8043 bytes.
    

_________________
----> * <---- My star, won HERE
Post 02 Sep 2009, 05:31
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Quote:
Anyway, maybe it could be possible to just reserve the address space in Windows and catch the page fault exception in order to allocate new pages in the middle when needed? But I still doubt it would give any advantage, it would probably only decrease the performance and not help with anything.

Nice idea. If there was some serious issue with FASM eating too much memory, someone might welcome this as an extra option (command line extra switch). But I am not sure either if there is use for that.
Post 02 Sep 2009, 10:54
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2466
Location: Bucharest, Romania
Borsuc
windwakr wrote:
Ah, I see. Didn't know the DOS emulated programs didn't have access to all the memory.

Here's the output on the Win32 console one:
Code:
[BLAH] >fasm test.asm
flat assembler  version 1.68  (1110194 kilobytes memory)
1 passes, 8043 bytes.
    
That means you have more than 1GB free space Wink
I had around 700MB free at the time, now it uses almost 2GB Laughing

Question: does this trash my cache that is in RAM?

_________________
Previously known as The_Grey_Beast
Post 02 Sep 2009, 14:58
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
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


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.