flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > [unrealistic idea]Decrease FASM memory usage |
Author |
|
Octavio 05 May 2007, 08:56
vid wrote: i was thinking about memory usage of FASM. I think that fasm has a multipass preprocessor ,so it has to use text format to the end. |
|||
05 May 2007, 08:56 |
|
vid 05 May 2007, 09:44
Ocatvio: no, fasm has single-pass preprocessor
|
|||
05 May 2007, 09:44 |
|
Madis731 11 May 2007, 07:37
in some cases where you have tons (weigh unit ) of null-data and FASM mistakens it to be useful and take tons of RAM accordingly and "tons of time"
Usually I'll give FASM more memory until in finishes, but there are other limits, like my 2Gigs or RAM + some swap Damn, I forgot the example I wanted to post. I hope you understand without. |
|||
11 May 2007, 07:37 |
|
Octavio 12 May 2007, 22:48
vid wrote: Ocatvio: no, fasm has single-pass preprocessor perhaps it needs the sources for the macros,i donĀ“t know, but memory should not be a problem even if the source is loaded, i have no notice about big assembly sources (discarding stupid sources). >cases where you have tons (weigh unit ) of null-data and FASM Then it is a programmer mistake. |
|||
12 May 2007, 22:48 |
|
vid 13 May 2007, 01:18
Octavio:
problem with memory usage pops out if you want to define headers (imports, externs, symbols, argcounts) with macros. If such macros contains conditional statements ("if"), both parts get preprocessed, and resulting text for both branches must be produced. In practice, with lot of headers you can end up with 30-60MB of RAM used, with lot of preprocessed headers. |
|||
13 May 2007, 01:18 |
|
MCD 29 Oct 2007, 16:12
I really think the preprocessor's memory usage should be optimized.
Symbolic names should be "deallocated" after they get restored and macros after they get purged. I mean, you can't just decrement the memory end pointers cause multiple symbols are somewhere in the middle of the memory pool. And even if you manage to merk some memory as undeclared, you will get bad memory fragmentation, and I guess that everyone here knows what this means. (sloth) And I doubt this will be easy to implement in current fasm with it's hashed name space. |
|||
29 Oct 2007, 16:12 |
|
edfed 29 Oct 2007, 17:14
decreasing memory usage can be pretty good
it can permitts to write more code lines but for the moment it's not needed, because we can compile big programs without any problem |
|||
29 Oct 2007, 17:14 |
|
vid 29 Oct 2007, 17:48
Quote: but for the moment it's not needed, because we can compile big programs without any problem not really. Depends on how macroed is your program, and how many headers you use |
|||
29 Oct 2007, 17:48 |
|
edfed 29 Oct 2007, 22:16
if all macros are preprocessed first, can they be converted into binary?
or only text copy is good? it's really a strnge way to code in asm for the moment i don't have many headers i try to implement all functions of the same class with the same header |
|||
29 Oct 2007, 22:16 |
|
vid 29 Oct 2007, 22:53
Quote: if all macros are preprocessed first, can they be converted into binary? that is how it works now: 1. source is preprocessed (macros converted, etc...) 2. source is parsed to custom binary syntax 3. that one is assembled. problem is that memory usage is highest after preprocessing before parsing, when everything is in textual form. So my idea is to immediately convert every line to binary form after it is preprocessed. Quote: for the moment i don't have many headers don't you use 'win32a.inc' or 'win32ax.inc'. because if yes, then you DO have many headers. PS: Could you please use normal way to separate sentences, eg end sentence with "." and start next sentence with capital letter? This way your posts are quite ugly to read. |
|||
29 Oct 2007, 22:53 |
|
edfed 29 Oct 2007, 23:29
Sorry, i am used to T9, and thinking about making a function that put capitals letters at the begin of a sentence, and ending with "." before CR.
Habitually, i never use capital letters while coding. About fasm, if you do that, if someone do that, it will become the so wanted FASM 2.0. No? |
|||
29 Oct 2007, 23:29 |
|
vid 29 Oct 2007, 23:58
Quote: About fasm, if you do that, if someone do that, it will become the so wanted FASM 2.0. No? no And I am not so sure FASM2 is so wanted... Quote: Sorry, i am used to T9 you write to board from your mobile phone? Or is it just that strong custom? |
|||
29 Oct 2007, 23:58 |
|
bitRAKE 30 Oct 2007, 04:35
If the sources are not monolithic then memory usage is not an issue, imho.
format COFF |
|||
30 Oct 2007, 04:35 |
|
vid 30 Oct 2007, 14:21
format COFF in FASM is hard to maintain because lack of control from command line. Circumventing this via some "config file" which is included from every object is possible, but not very neat.
|
|||
30 Oct 2007, 14:21 |
|
bitRAKE 30 Oct 2007, 15:29
vid wrote: format COFF in FASM is hard to maintain because lack of control from command line. Circumventing this via some "config file" which is included from every object is possible, but not very neat. |
|||
30 Oct 2007, 15:29 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.