A method and system for allocating and freeing memory in an electronic system allocates available memory by including at least one or more flags that indicate the size and status of the allocated segment in the same area in which the segment is allocated. A free portion in the available memory is searched such that the free portion is sufficient to accommodate the requested segment. Upon finding a free portion, a new segment is created in the free portion where the new segment includes an allocated segment equal in size to the requested segment and further includes a segment area that accommodates at least one flag of the allocated segment such that the segment area is adjacent to the allocated segment. At least one flag of the allocated segment is set, and may include a size flag or a status flag that indicates whether the allocated segment is occupied and whether the allocated segment is the last segment.

Μια μέθοδος και ένα σύστημα για και τη μνήμη σε ένα ηλεκτρονικό σύστημα διαθέτουν τη διαθέσιμη μνήμη με τη συμπερίληψη τουλάχιστον μιας ή περισσότερων σημαιών που δείχνουν το μέγεθος και τη θέση του διατιθέμενου τμήματος στην ίδια περιοχή στην οποία το τμήμα διατίθεται. Μια ελεύθερη μερίδα στη διαθέσιμη μνήμη αναζητάται έτσι ώστε η ελεύθερη μερίδα είναι επαρκής για να προσαρμόσει το ζητούμενο τμήμα. Επάνω στην εύρεση μιας ελεύθερης μερίδας, ένα νέο τμήμα δημιουργείται στην ελεύθερη μερίδα όπου το νέο τμήμα περιλαμβάνει ένα διατιθέμενο τμήμα ίσο στο μέγεθος με το ζητούμενο τμήμα και περιλαμβάνει περαιτέρω μια περιοχή τμήματος που προσαρμόζει τουλάχιστον μια σημαία του διατιθέμενου τμήματος έτσι ώστε η περιοχή τμήματος είναι δίπλα στο διατιθέμενο τμήμα. Τουλάχιστον μια σημαία του διατιθέμενου τμήματος τίθεται, και μπορεί να περιλάβει μια σημαία μεγέθους ή μια σημαία θέσης που δείχνει εάν το διατιθέμενο τμήμα είναι κατειλημμένο και εάν το διατιθέμενο τμήμα είναι το τελευταίο τμήμα.

 
Web www.patentalert.com

< Apparatus has a microprocessor including DSP and a CPU integrated with each other as a single bus master

< Models and technique for automated fault isolation of open defects in logic

> Method and apparatus for testing a process in a computer system

> System and method for digital communication

~ 00065