The invention relates to the technical field of embedded systems, in particular to a
memory management method for dynamic allocation of an
operating system and a storage medium, and
dynamic memory management is realized by transforming a memory allocation interface and an operation interface of the
operating system. A memory applicant adds a flag bit when initiating a demand application, an
operating system executes allocation operation according to the flag bit, when the flag bit indicates that the demand is determined, allocation is performed according to a specified length, and when the flag bit indicates that the demand is not determined, a fixed-length
memory block is allocated firstly. And when the
memory operation is executed, detecting the idle state of the subsequent
memory block according to the memory head flag bit, and expanding the original
memory block or redistributing and
copying data. According to the method, the memory waste can be remarkably reduced, the memory use efficiency under resource-limited scenes such as an embedded scene and the like is improved, the
system flexibility is enhanced through configuration file adjustment and a flag bit strategy while stable operation of a program is guaranteed, and
memory management and maintenance are facilitated in combination with detailed memory information records.