error: out of memory

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
thewebparadox
Posts: 4
Joined: Sun Jun 10, 2018 4:27 pm
Libera.chat IRC: the web paradox

error: out of memory

Post by thewebparadox »

failed to boot both default and fallback entries.

this is the error I get when I try to boot my OS with qemu, OR virtualbox. I compiled many times in different ways configured some settings a bunch of times and nothing worked. All the time the same error.
finesseOS
kzinti
Member
Member
Posts: 898
Joined: Mon Feb 02, 2015 7:11 pm

Re: error: out of memory

Post by kzinti »

Well that's too bad. Thanks for sharing.
User avatar
thewebparadox
Posts: 4
Joined: Sun Jun 10, 2018 4:27 pm
Libera.chat IRC: the web paradox

Re: error: out of memory

Post by thewebparadox »

kzinti wrote:Well that's too bad. Thanks for sharing.
not helping.
finesseOS
User avatar
thewebparadox
Posts: 4
Joined: Sun Jun 10, 2018 4:27 pm
Libera.chat IRC: the web paradox

Re: error: out of memory

Post by thewebparadox »

FIXED FINALLY

edit - reason is because the RAM was too less which i did not realize the OS needed like 1 GiB and i put 264 megabytes =D> =D> =D>
finesseOS
kzinti
Member
Member
Posts: 898
Joined: Mon Feb 02, 2015 7:11 pm

Re: error: out of memory

Post by kzinti »

thewebparadox wrote:not helping.
There wasn't anything in your post to help you with.
glauxosdever
Member
Member
Posts: 501
Joined: Wed Jun 17, 2015 9:40 am
Libera.chat IRC: glauxosdever
Location: Athens, Greece

Re: error: out of memory

Post by glauxosdever »

Hi,


Assuming you just started out (otherwise you would had already some previous build that worked), having a requirement of 1 GiB is definitely too much. I suggest you look into it. Are you sure your code is loaded at the address you expect it (usually 0x00100000)? Even if built with the most "unoptimised for size" options, a Bare Bones kernel should be way less than 100 KiB, let alone 1 GiB.


Regards,
glauxosdever
User avatar
iansjack
Member
Member
Posts: 4706
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: error: out of memory

Post by iansjack »

It's good when an error message tells you exactly what the problem is. :)
MichaelPetch
Member
Member
Posts: 799
Joined: Fri Aug 26, 2016 1:41 pm
Libera.chat IRC: mpetch

Re: error: out of memory

Post by MichaelPetch »

Have to agree with glaux, I think there is something more to this. I assume the out of memory error was from Grub? If you posted your code (on github or some other service) to this point we could take a look. I have a suspicion you are masking another problem by changing memory size.

I am curious if you are doing the higher half kernel?
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: error: out of memory

Post by AJ »

Hi,

My best guess (given that I don't have Combuster's famous crystal ball...) is that one of two things is happening:
  1. You have a lower half stub and higher half kernel in the same flat binary and your linker has kindly padded the kernel out to a multi-GiB file. In this case switch to ELF.
  2. You have linked the higher-half kernel to some high memory address and the linker is attempting to place your kernel at that physical location. In this case, make use of proper linker directives to separate your kernel's physical and linear addresses.
Cheers,
Adam
Post Reply