flat assembler
Message board for the users of flat assembler.

Index > Windows > [fasmg] How do I exceed 4 GB memory usage?

Author
Thread Post new topic Reply to topic
Aulimaitar



Joined: 03 Mar 2022
Posts: 2
Location: California
Aulimaitar
(Pardon me if this is a dumb newbie question.)

This week as my codebase become just slightly more complex I hit the message:
"Error: not enough memory to complete the assembly."

I used Windows Task Manager to check memory usage, and I see that fasmg spikes to over 4 GB of memory usage when it compiles last week's codebase (successfully). I take it that fasmg has a memory ceiling of 2^32 bytes? Is there any simple way to stop fasmg from needing so much memory in order to compile my program that has <60K of output?

I am currently using last week's version g.jje9 for Windows, on a 64-bit Windows 7 machine. Is there a 64-bit version of fasmg for Windows that would be able to compile my program? Is there a 64-bit version for a different OS that would be able to compile my program?
Post 03 Mar 2022, 21:17
View user's profile Send private message Visit poster's website Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 526
Ali.Z
Aulimaitar wrote:
Is there a 64-bit version for a different OS that would be able to compile my program?


Linux.

_________________
Asm For Wise Humans
Post 04 Mar 2022, 22:22
View user's profile Send private message Reply with quote
Aulimaitar



Joined: 03 Mar 2022
Posts: 2
Location: California
Aulimaitar
Thanks!
Post 04 Mar 2022, 22:31
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8028
Location: Kraków, Poland
Tomasz Grysztar
All versions of fasm/fasmg are limited to 4G, as the assembler core uses 32-bit pointers in its data structures. The x64 variants are provided solely because of systems (like some Linux versions) that have no ability to run 32-bit executables.

However, it is very unusual for fasmg to actually need this much memory - even the assembly of HeavyThing, which is a substantial project, requires only about 40-50 MB of memory. If the memory usage goes into GB range for a more or less standard program, it is caused either by a bug in the assembler or by some runaway inefficiency in the macros used in the project. In either case this would need further investigation, as it is very unlikely that it truly needs to use that much memory (if it was usual for memory requirements to be that high, I would work on an actual 64-bit version of fasmg, but it's not).
Post 08 Mar 2022, 18:36
View user's profile Send private message Visit poster's website 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.