| Embedded system is a special computer system whose purpose is for special applications. It bases on computer technology, the hardware and software of embedded system can be customized. Some factors are crucial to embedded system such as function, reliability, cost, the size and work. The Embedded Operating System is the most important thing in the architecture of Embedded System. As an advanced Embedded Operating System, WindowsCE becomes more and more popular.Compared with desktop system, WindowsCE system simplifies the function of memory management deeply due to the running on a resource limited embedded system. Although the running cost is reduced, the maturity of function is influenced. As a result, there are some problems in virtual memory management, heap management and process spatial management of WindowsCE.Based on the problems above, this thesis analysis the mechanism of WindowsCE's memory management. The thesis expands the physic memory management mechanism, virtual memory management mechanism and heap management through the area of source code in WindowsCE, data structure and principle of arithmetic. Further more it analysis the set-up procedure in the memory management in WindowsCE system. It also investigates the working principle in X86's Memory Management Unit for the virtual memory management mechanism in WindowsCE system.The thesis introduces a new mechanism for memory allocation of class. When create a class object, it allocates the memory and calls construct function. On the other hand, it releases both memory and deconstructs the class object. We use standard C++'s operator overload mechanism in order to deal with the calling problem in constructor function and destructor. The small-object allocation is implemented through the small-object allocate technology. The small-object allocation did a special method in the small-object space allocation in order to centrally management the class objects which have the same size. The solutions above not onlyoptimize the heap space in WindowsCE system but also play a better performance than standard C++.The design used to store dynamic data structure in mechanism of memory management due to the lack of virtual memory allocation mechanism in WindowsCE system. This mechanism used memory pool to implement the memory allocation. This article introduces the data structure and the main interface function implement circuit in this mechanism. It also simplifies the arithmetic of chip collection in order to improve practicability. When more memory chip appears, the space of memory pool uses the arithmetic to be optimized. At the end of the article, it describes the test result in the performance of virtual allocation mechanism of WindowsCE system. |