Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #8374
| From | "Ant" <not@home.today> |
|---|---|
| Newsgroups | comp.programming |
| Subject | Re: How Physical Memory Mapping / Allocation works |
| Date | 2018-02-26 23:04 +0000 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <p723t7$1dd4$1@gioia.aioe.org> (permalink) |
| References | <d6d4eb53-f2b1-41c3-b6d1-4be6a142be05@googlegroups.com> |
"Ilias Abrams" wrote: >I am new on software programming and I am trying to understand some >basic/ important things. I am interested in Bare-metal software >programming, Do you mean with no operating system (OS)? >so please give me answers related on this. My question >is: who is responsible and manage the physical memory mapping / >allocation? Meaning, If I have 1GB physical memory on my system, the >1) CPU or 2) the Bootloader (like GRUB, U-boot) is responsible for >the memory addresses that I can use for my program? The OS. Without an OS - you are responsible. >Is hardware >specific architecture? Each platform manufacture has their own memory >address mapping scheme and layout? Furthermore, is there any standart >way that you have to partition the physical memory? meaning, give some >memory for I/Oports and so on? The OS takes care of mapping physical memory to virtual memory, otherwise it's hardware dependant. >Sorry for the mess, but I dont understand when you create/ build your >software, how you know what range of physical addresses you can use >for start/entry point, stack and so on. You don't use physical memory. You request virtual memory from the OS via the appropriate interface (usually malloc if using C). >Please help me to clear all this in my mind. If you can give me >examples will help me more P.S. Programming in C Are you writing an OS kernel or user software? If you are writing a kernel you will need to understand the hardware and will have to write some code in the assembler language for your chosen platform. If writing user code, things like stack and I/O space are taken care of automatically by the OS.
Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How Physical Memory Mapping / Allocation works Ilias Abrams <iliasabrams@gmail.com> - 2018-02-26 14:07 -0800 Re: How Physical Memory Mapping / Allocation works "Ant" <not@home.today> - 2018-02-26 23:04 +0000 Re: How Physical Memory Mapping / Allocation works Ed Prochak <edprochak@gmail.com> - 2018-02-28 14:03 -0800
csiph-web