flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > BUG: "error: out of memory" Win32

Author
Thread Post new topic Reply to topic
FlashBurn



Joined: 06 Jan 2005
Posts: 87
FlashBurn 21 Jun 2005, 16:52
Today I wanted to code some string functions for my os and changes also a little bit my code, but as I wanted to compile my code I got this error! I can still compile small files. The problem is, why are 800MB free RAM not enough?
Post 21 Jun 2005, 16:52
View user's profile Send private message Reply with quote
coconut



Joined: 02 Apr 2004
Posts: 326
Location: US
coconut 21 Jun 2005, 21:08
did you try to change the memory size in Options > Compiler setup menu?
Post 21 Jun 2005, 21:08
View user's profile Send private message Reply with quote
FlashBurn



Joined: 06 Jan 2005
Posts: 87
FlashBurn 22 Jun 2005, 04:19
Yes, and this also didn´t work and normally I´m using the commandline version of fasm!
Post 22 Jun 2005, 04:19
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 22 Jun 2005, 06:18
You have to show the source that causes the problem.
Post 22 Jun 2005, 06:18
View user's profile Send private message Visit poster's website Reply with quote
FlashBurn



Joined: 06 Jan 2005
Posts: 87
FlashBurn 22 Jun 2005, 20:44
I will see when I can load it up, because it is a little bit big (109KiB)!
Post 22 Jun 2005, 20:44
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 22 Jun 2005, 21:15
flashburn, compress it? Smile
Post 22 Jun 2005, 21:15
View user's profile Send private message Visit poster's website Reply with quote
coconut



Joined: 02 Apr 2004
Posts: 326
Location: US
coconut 22 Jun 2005, 23:28
commandline also has -m switch to specify memory settings look in the manual
Post 22 Jun 2005, 23:28
View user's profile Send private message Reply with quote
FlashBurn



Joined: 06 Jan 2005
Posts: 87
FlashBurn 23 Jun 2005, 10:59
I compressed it, but I have to share my internet connection with my brother and upload is like hell Sad The -m switch didn´t helped as I tested it with fasmw!


Description: This is all of the source you need to compile my kernel
Download
Filename: OS.zip
Filesize: 31.05 KB
Downloaded: 732 Time(s)

Post 23 Jun 2005, 10:59
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 23 Jun 2005, 11:38
The problem is caused by this line in your task_t structure:
Code:
        .name                   rb (256 - .name)    

which, when the current offset is above 256, tries to reserve the negative amount of bytes. That was also indeed a flaw in fasm, since it was signaling the wrong error message - I've updated the 1.62 with the fix. Thanks for the report.
Post 23 Jun 2005, 11:38
View user's profile Send private message Visit poster's website Reply with quote
FlashBurn



Joined: 06 Jan 2005
Posts: 87
FlashBurn 23 Jun 2005, 13:46
OK, but what have I to write that I get the value "256 - offset of .name in the structure"?
Post 23 Jun 2005, 13:46
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 23 Jun 2005, 13:50
In general, the offset of .name is the address of .name minus the address of the structure. You can use some additional label:
Code:
struc foo
 {
   .start:
   .name  rb 256 - (.name-.start)
 }    


But since you define also "task_t task_t" at address 0 to get the structure offset, the simplest should be just:
Code:
.name                   rb (256 - task_t.name)    
Post 23 Jun 2005, 13:50
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 23 Jun 2005, 14:21
to the first one
Code:
struc foo{
local ..start
..start:
.name rb 256 - ..start
}    

just like first privalov's, but this way you won't get defined additional label task_t.start and won't change namespace for some very special causes.
Post 23 Jun 2005, 14:21
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 23 Jun 2005, 14:56
Even better:
Code:
struc foo
 {
   .:
   .name  rb 256 - (.name-.)
 }    

this one doesn't use any additional label at all.
Post 23 Jun 2005, 14:56
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.