Search found 59 matches

by xixpsychoxix
Sun Feb 21, 2010 12:13 am
Forum: Beginners
Topic: virtual memory
Replies: 33
Views: 113902

Re: virtual memory

Hey thanks alot. if you can post the fixed routine i would be very appreciative! or is that the one you already posted?
by xixpsychoxix
Sat Feb 20, 2010 9:57 pm
Forum: Beginners
Topic: virtual memory
Replies: 33
Views: 113902

Re: virtual memory

oh. well i kinda knew that. im not really sure how to use it then i suppose... i'll re-read the chapter and see what happens. can anyone give me advice on how to accomplish what i am trying to do?
by xixpsychoxix
Fri Feb 19, 2010 10:55 pm
Forum: Beginners
Topic: virtual memory
Replies: 33
Views: 113902

virtual memory

ok, so i got my memory allocator working but i now want to start my heap at 0xD0000000 (virtual memory) and have it end at 0xDFFFFFFF. However, I cannot adapt the virtual memory manager initializing code to correctly map these addresses to physical addresses. How do I use the virtual memory manager ...
by xixpsychoxix
Tue Feb 16, 2010 6:22 pm
Forum: Beginners
Topic: memory allocation functions
Replies: 12
Views: 32592

Re: memory allocation functions

so what i should do is make a header for each allocation and place it right before the allocated memory? so if this is the header: typedef struct { uint32_t *size; } header; each chunk it would look something like this: bytes 1-3 : size bytes 3 - size: allocation and my function would return the add...
by xixpsychoxix
Tue Feb 16, 2010 3:57 am
Forum: Beginners
Topic: memory allocation functions
Replies: 12
Views: 32592

Re: memory allocation functions

i know this post is old, sorry but i have one other thing. I have read alot about memory management and have decided to implement a linked-list style allocation using headers to point to allocated regions. The problem is I don't know what i should do about the list of headers because I cannot obviou...
by xixpsychoxix
Tue Nov 24, 2009 4:07 am
Forum: Beginners
Topic: memory allocation functions
Replies: 12
Views: 32592

Re: memory allocation functions

i dunno i suppose that i still dont fully understand the concepts of memory allocation. when you say stack is this the processor's stack or are we talking about something abstract here? i dont understand stack-based allocation at all. i think i understand the heap. that is just pretty much a chunk o...
by xixpsychoxix
Sun Nov 22, 2009 8:05 pm
Forum: Beginners
Topic: memory allocation functions
Replies: 12
Views: 32592

Re: memory allocation functions

so then i should not write malloc to allocate single bytes of memory? so then if i write this in windows:

Code: Select all


char *example = (char *) malloc (1);

how much space does this actually reserve? only one byte or multiple?
by xixpsychoxix
Wed Nov 18, 2009 1:58 am
Forum: Beginners
Topic: memory allocation functions
Replies: 12
Views: 32592

Re: memory allocation functions

ok, but i was going over some options and to use a bitmap to store information about bytes currently available it would take 1 byte per 8 bytes to mark bytes as used, so should i do it in larger chunks? because it seems that when you make a call to malloc it does not return a fixed chunk of memory b...
by xixpsychoxix
Tue Nov 17, 2009 9:09 pm
Forum: Beginners
Topic: memory allocation functions
Replies: 12
Views: 32592

Re: memory allocation functions

so would a good solution based off of what we have now (i plan on extending this much farther after the next few tutorials but i wanna write a temporary memory manager) be to simply use the physical memory manager to allocate an area of memory that i can divide up as needed? so that i could do somet...
by xixpsychoxix
Tue Nov 17, 2009 3:12 pm
Forum: Beginners
Topic: multiboot question
Replies: 1
Views: 12551

multiboot question

In the first tutorial that we used the multiboot header (the physical memory manager) you said that multiboot specifies that the paging bit in cr0 must be clear when you execute your multiboot kernel but you have set up stage2 to set paging enabled so is this OS going to be multiboot compliant? will...
by xixpsychoxix
Thu Nov 12, 2009 3:02 am
Forum: Beginners
Topic: memory allocation functions
Replies: 12
Views: 32592

memory allocation functions

I wanted to get started writing some memory functions like malloc and free, but i have no idea how to start. Basically what i am asking is if someone can give me like a basic overview of how to use the tutorial's physical or virtual memory manager to start writing stuff like this. Or a tutorial on t...
by xixpsychoxix
Tue Nov 10, 2009 12:35 pm
Forum: Beginners
Topic: stage 2 issue
Replies: 3
Views: 16071

Re: stage 2 issue

yeah i made the change in my own code and i dunno if i was imagining it or not but the program actually seemed to perform a little better, faster and more consistently but like i said my mind could be playin tricks on me... actually, i just found something else that i wanted to ask about too. in the...
by xixpsychoxix
Tue Nov 10, 2009 2:09 am
Forum: Beginners
Topic: stage 2 issue
Replies: 3
Views: 16071

stage 2 issue

I was looking through the code for stage2.asm and common.inc from the demos. In common.inc you have the following: ImageSize db 0 but in stage2.asm you refer to it in the following way: mov dword [ImageSize],ecx so what im asking is, was ImageSize supposed to be db or dd? Cuz it seems like that coul...
by xixpsychoxix
Sat Nov 07, 2009 11:57 am
Forum: Beginners
Topic: Very goofy problem
Replies: 2
Views: 14280

Re: Very goofy problem

well the chapter was the latest demo, 21, and it seems that bochs is locking right at the SetLeds routine as i mentioned in one of my previous posts. The thing that i do not understand is that the OS works fine when COMPILED on one machine but not when compiled on another. that makes absolutely no s...
by xixpsychoxix
Sat Nov 07, 2009 12:08 am
Forum: Beginners
Topic: Very goofy problem
Replies: 2
Views: 14280

Very goofy problem

Ok, so i adapted the code for the demo as i said in my post about fat12 and i had alot of problems such as page faults in bochs to straight not working on real hardware. just... doing nothing. i compiled the code on my desktop and thought at first it was my code so i compiled the original demo sourc...