The invention relates to a
memory management method of an
embedded system, which comprises the steps of: (1), opening up a physical memory, managing the physical memory by using a turnover thread heap
management system, and allocating a memory space for data requirement from the
tail end and the head end of a thread heap free memory by the thread heap
management system, wherein the thread heap free memory has a
normal state N and a turnover state F; (2), dividing all data requirements into a temporary space requirement and an output space requirement, and allocating one end of the thread heap free memory to be a temporary end or an output end by a type thread heap
management system according to the data requirements; (3), allocating a head end memory to data required in a temporary space by the thread heap management
system; and (4), when a superior function calls a subordinate function, controlling the thread heap free memory to turn over by the thread heap management
system, when exiting the subordinate function, releasing a temporary space at the current temporary end, preserving the output space of the output end and merging with the temporary space of the temporary end of the superior function. The invention can realize timely release of the memory, has high operating efficiency, does not generate memory fragments, and can operate stably and efficiently for a long time.