首页>
外国专利>
Allocating memory sectors for a data block by finding a contiguous area which starts with a sector with unused memory at least at much as the overlap
Allocating memory sectors for a data block by finding a contiguous area which starts with a sector with unused memory at least at much as the overlap
Disclosed is a method and a memory controller for identifying an area in a memory in which to store a block of data. The memory is treated as comprising a plurality of memory sections of equal size, with a record of which sections are allocated and which memory locations within those sections are in use. The block of data is divided by the size of a memory section, with the remainder giving the size of an overlap. The memory is analysed to identify a region in which to store the block of data, such that the region has contiguous areas of memory sufficient to accommodate the block of data and starts in an allocated memory section that has enough unused memory to hold the overlap. If, a region is big enough, but the starting section cannot hold the overlap, the region is excluded. Regions that can be used may include contiguous areas of memory sufficient to accommodate the block of data and that commence in an unallocated memory section. After the memory has been analysed and several possible areas found the data is stored in the region with the starting section closest to the overlap.
展开▼