flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Fasm memory allocation (win32 console)

Author
Thread Post new topic Reply to topic
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo
Privalov,
the following lines are taken from win32/system.inc file:

Code:
init_memory:
    push    buffer
      call    [GlobalMemoryStatus]
        mov     eax,dword [buffer+8] ;Total phisical memory
; proposed modification:
;        mov     eax,dword [buffer+12] ;Available phisical memory
    


The questions is:
Isn't it better to use the available memory instead of total?
Post 26 Sep 2003, 10:03
View user's profile Send private message Yahoo Messenger Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7802
Location: Kraków, Poland
Tomasz Grysztar
No, because on computers with low physical memory it will be usually almost whole used - but it still can be allocated from swap space. On the other hand, I'm not using value of all available memory (earlier fasm versions were doing it), because it is causing increase of swap file on many systems (people were complaining about it).
Post 26 Sep 2003, 10:34
View user's profile Send private message Visit poster's website Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo
Thanks, I see it now.

Do you have performed an analysis on how much memory is needed by fasm (statistically)?
The idea is to allocate a certain quantity of memory (minimum possible) depending on source size.
Post 26 Sep 2003, 11:46
View user's profile Send private message Yahoo Messenger Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7802
Location: Kraków, Poland
Tomasz Grysztar
The problem is that I can determine the source size before allocating memory, as I have to load source files to see the "include" directives within them.
Post 26 Sep 2003, 11:59
View user's profile Send private message Visit poster's website Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo
I've got an idea to overcome this. Idea
I will take this weekend to work on it.
Post 26 Sep 2003, 15:43
View user's profile Send private message Yahoo Messenger 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 GitHub, YouTube, Twitter.

Website powered by rwasa.