On Time RTOS-32 Documentation
Welcome
RTTarget-32
RTTarget-32 Programming Manual
Introduction
Running Win32 Programs without Win32
The i386 Microprocessor
RTLoc: Locating a Program
Running a Program on the Target
Cross Debugging
Using an IDE
The RTTarget-32 API
Demo Programs
Advanced Topics
Choosing a Locate Method
Running with or without Paging
Running at CPL 0 or 3
Installing Hardware Interrupt Handlers
Catching NULL Pointer Assignments
Catching Stack Overflows
Running without Run-Time System
Avoid Repeated Downloads
Configuration for Debug and Release Builds
Using Data Compression
Using DLLs through RTLoc
Loading DLLs through a File System
RAM File System
Installable File System
Multithread Applications
Using the MetaWINDOW Graphics Library
Using the 387 Emulator
Using Non-Volatile Memory
APIC Mode
Multiprocessor Applications
Custom MP Floating Pointer Structure
RTVmf-32
RTRth-32
Performance Optimizations
Compiling and Linking with On Time RTOS-32
Redistributable Components of RTTarget-32
RTLoc Error Messages
RTTarget-32 Reference Manual
RTKernel-32
RTFiles-32
RTIP-32
RTPEG-32
RTUSB-32
|
Running with or without Paging
RTTarget-32 supports paging through the Locate PageTable command. However, this feature is optional.
Advantages of Paging
- Memory protection. Each 4k page of memory has its own access rights. In this way, memory which should not be accessed or modified at run time can be protected. Since every invalid memory access causes an exception, this feature is very useful for debugging a program with stray pointers or similar bugs.
- Virtual Regions. Some programs can be mapped more efficiently in a virtual region.
- RAM remapping using FillRAM. Unused pages of memory can be appended to another region. This has two advantages: regions larger than physically available can be created for program entities that must be located in consecutive address space (such as stack or heap). In addition, memory that would be wasted due to alignment restrictions without paging can be used.
- Uncommitted memory support. RTTarget-32's virtual memory manager can be used only if paging is enabled.
Disadvantages of Paging
- Memory overhead. The page table itself requires memory on the target system. For example, the page table for a computer with 4M of memory needs 8k. If RAM remapping is used, the page table grows to 12k.
- Run-time overhead. Paging can lead to slightly slower program execution. The amount of overhead incurred depends on the program's use of memory and the CPU used. However, the overhead is hardly measurable and can be ignored on most systems.
Generally, the use of paging is recommended. The extra level of protection usually outweighs the small overhead incurred. If very low resource requirements are a major design goal, paging could be used during software development only and disabled for the production release. For applications using DLLs, paging is recommended to be able to use the virtual memory manager.
Advanced Topics
Choosing a Locate Method
Running at CPL 0 or 3
|