flat assembler
Message board for the users of flat assembler.

Index > Main > 12MB increase in memory

Author
Thread Post new topic Reply to topic
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
flat assembler 1.51 FASMW.ASM line 386:
Code:
mov    [compiler_memory],16384    


same line in flat assembler 1.50:
Code:
mov  [compiler_memory],4096    


Why such increase? Is it because of hash tree?

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 18 Feb 2004, 22:16
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7724
Location: Kraków, Poland
Tomasz Grysztar
Yes.
Post 19 Feb 2004, 08:45
View user's profile Send private message Visit poster's website Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
Good response Smile

I tried compiling with 4MB, and it compiled everything I tried fine (one I had to increase 8, but it was 8 with older fasm too). So why is default increase so much?

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 19 Feb 2004, 14:25
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo
comrade wrote:
Good response Smile

Sometimes our master is very prolific. I was waiting a detailed answer too Smile

I have noted that fasm tried to allocate a big quantity of memory to use only a small fraction of it. Doing in that way saves the time of bound checking. I have no idea about the difference in time between a large allocation and a smaller one Question
Post 19 Feb 2004, 15:20
View user's profile Send private message Yahoo Messenger Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
(sorry if this is already supported in fasm, I haven't used it extensively yet - I skimmed through the documentation and system.inc, though).

What about being able to specify memory limits on the commandline? I would suggest something like the following...

*) if nothing is specified on the cmdline, allocate default amount of memory. Either a percentage, as now, or some sensible smallish default that'll handle average-size apps (for those few large ones, it's not too bad passing along some cmdline argument I guess).

*) If only one size is specified on cmdline, allocate a block this large, and determine the fasm-internal size as a percentage of this block (probably with minimum (and maxmium?) size).

*) and of course, being able to specify total memory block size + fasm-internal block size on cmdline.

Just a suggestion, and nothing that's important to me with the size of the stuff I'm doing in fasm, but it might be helpful to other people Smile

Quote:

I have no idea about the difference in time between a large allocation and a smaller one

Hmm, interesting question actually. On proper OSes, the difference in allocation speed should be very small, if you're using a relatively low-level allocation routine. If you use HeapAlloc with HEAP_ZERO_MEMORY you should be able to feel some speed difference with large allocs; (on NT), VirtualAlloc'ing 768MB (even with MEM_COMMIT) takes a fraction of a second - mem usage ~900kb, VM size ~768mb. The 'real' allocation work is done later on, on access.

Can't remember my tests on 9x though, but iirc at least when using Memory-Mapped Files there, page-file space is *always* allocated - perhaps large VirtualAlloc's are slow, too.
Post 19 Feb 2004, 19:18
View user's profile Send private message Visit poster's website Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
My confusion was that I thought hashes of identifiers are supposed to take less space than actual string titles? And if duplicate hash exist, you use full string title. No?

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 19 Feb 2004, 20:57
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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 YouTube, Twitter.

Website powered by rwasa.