More memory for compiler and FASM
-
- Addict
- Posts: 1264
- Joined: Wed Feb 28, 2007 9:13 am
- Location: London
More memory for compiler and FASM
As can be seen in this thread and this thread, there seems to be a bug with large source codes in that PB doesn't pass enough memory to its own compiler, or to FASM, to deal with. One or the other crashes as a result.
I'm currently getting round this by deleting and merging procedures and getting rid of macros, but it is making my code rather messy.
Surely it would be easy to fix this?
For FASM, you could have a project setting - "Run FASM with ?KB memory" - and people could increase the amount until FASM worked. Or just have PB estimate the memory needed.
For the PB compiler error, same solution. Can the needed memory be estimated? Or just allow people to set the amount of memory it gets, until it works.
I'm currently getting round this by deleting and merging procedures and getting rid of macros, but it is making my code rather messy.
Surely it would be easy to fix this?
For FASM, you could have a project setting - "Run FASM with ?KB memory" - and people could increase the amount until FASM worked. Or just have PB estimate the memory needed.
For the PB compiler error, same solution. Can the needed memory be estimated? Or just allow people to set the amount of memory it gets, until it works.
JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."
Re: More memory for compiler and FASM
Why can't FASM and PB just use all available memory like any other program?
The 32bit versions should be able to use 2GB if you have "so much"
memory in your PC.
I can not believe they hardcoded a limit for memory use.
The 32bit versions should be able to use 2GB if you have "so much"

I can not believe they hardcoded a limit for memory use.
-
- Enthusiast
- Posts: 443
- Joined: Sun Apr 06, 2008 12:54 pm
- Location: Brisbane, Qld, Australia
- Contact:
Re: More memory for compiler and FASM
I agree, and thanks for your assistance, Seymour. Hopefully the matter is already being considered because I note that Rings moved this thread to the bugs section. A permanent fix to this issue would be desirable because until it is fixed I presume we will need to redo the work-around each time we install a new version of PB.
-
- Addict
- Posts: 1675
- Joined: Sun Dec 12, 2010 12:36 am
- Location: Somewhere in the midwest
- Contact:
Re: More memory for compiler and FASM
I wasn't even aware this was a problem... I don't know if I'll ever produce a HUGE project, but I hope this gets resolved either way!
-
- Addict
- Posts: 1264
- Joined: Wed Feb 28, 2007 9:13 am
- Location: London
Re: More memory for compiler and FASM
It would be good to hear from Fred or Freak about this. Surely this would be an easy thing to add for v4.61?
JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."
Re: More memory for compiler and FASM
Should be possible to raise dynamically the limit, i will take a look.
-
- Addict
- Posts: 1264
- Joined: Wed Feb 28, 2007 9:13 am
- Location: London
Re: More memory for compiler and FASM
Thanks, Fred. 

JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."
-
- Addict
- Posts: 1264
- Joined: Wed Feb 28, 2007 9:13 am
- Location: London
Re: More memory for compiler and FASM
I just had to cut the project down again. I'm not sure how much more I can cut it.
The strange thing is, I was using Danilo's patch and the compiler still crashed. So maybe it isn't a memory issue.
I'm getting worried about this. This is a project I've been developing for nearly 3 years and it would be a disaster if I had to rewrite it in another language. 125k lines!
The strange thing is, I was using Danilo's patch and the compiler still crashed. So maybe it isn't a memory issue.
I'm getting worried about this. This is a project I've been developing for nearly 3 years and it would be a disaster if I had to rewrite it in another language. 125k lines!
JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."
-
- Enthusiast
- Posts: 443
- Joined: Sun Apr 06, 2008 12:54 pm
- Location: Brisbane, Qld, Australia
- Contact:
Re: More memory for compiler and FASM
Is it feasible to move some of your code into a DLL? That's an approach I considered but fortunately have not yet had to do so.
-
- Addict
- Posts: 1675
- Joined: Sun Dec 12, 2010 12:36 am
- Location: Somewhere in the midwest
- Contact:
Re: More memory for compiler and FASM
I was just thinking the same.. Surely as you have developed you've tried to compartmentalize code a little bit, based on what it does?
It might be easier to just take some of your more narrow-scope source and compile it as a DLL, then include it in the project that way.
It might be easier to just take some of your more narrow-scope source and compile it as a DLL, then include it in the project that way.
-
- Addict
- Posts: 1264
- Joined: Wed Feb 28, 2007 9:13 am
- Location: London
Re: More memory for compiler and FASM
Yes, of course it's possible to split it up into DLLs, but that would be messy. It may have to be done, I realise that.
I'm thinking of taking out all the SVG/graphics stuff and making a dedicated graphics DLL which would perform tasks when required by the main program. That would be a tidy way to split things up. I'm not sure how much breathing space it would create, though - hopefully enough to keep me going until we get this dynamic memory.
I'm thinking of taking out all the SVG/graphics stuff and making a dedicated graphics DLL which would perform tasks when required by the main program. That would be a tidy way to split things up. I'm not sure how much breathing space it would create, though - hopefully enough to keep me going until we get this dynamic memory.
JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."
Re: More memory for compiler and FASM
Feel free to send me your project for testing purpose, the compiler shouldn't crash, 125k lines isn't that big.