Patent ID: 8838928

Claim:
A method of managing a memory of an apparatus, the apparatus executing one or more processes using the memory, the method comprising: (a) maintaining a plurality of lists of identifiers, wherein each list has an associated size value and an associated threshold corresponding to a maximum number of identifiers in that list, wherein each identifier identifies a corresponding region of the memory that had been allocated for a process but that is currently not required by any of the one or more processes, and wherein a size of a region of the memory identified by an identifier in a list equals the size value associated with that list; (b) when a process requests allocation of a region of the memory: selecting one of the lists that has an associated size value suitable for the allocation request; and if the selected list is not empty, indicating to that process a region of the memory identified by one of the identifiers in the selected list and removing that identifier from the selected list, and, otherwise, allocating a region of the memory with a size of the size value associated with the selected list and indicating the allocated region of the memory to that process; and (c) adjusting one or more of the thresholds in dependence upon the current usage of the memory by the one or more processes.