Patent ID: 7100009

Claim:
A method for selected memory coalescing across memory heap boundaries in a computer system having a plurality of allocated memory heaps, said method comprising the steps of: maintaining an identification of an allocated memory heap containing a preceding adjacent block of memory and an identification of an allocated memory heap containing a succeeding adjacent block of memory for each block of memory within said plurality of allocated memory heaps; determining a usage state of both a preceding adjacent block of memory and a succeeding adjacent block of memory in response to a freeing of a selected block of memory; temporarily locking access to only those allocated memory heaps containing a free preceding or a free succeeding adjacent block of memory for said selected block of memory; coalescing said selected block of memory with a free preceding adjacent block of memory and/or a free succeeding adjacent block of memory; updating said maintained identification of allocated memory heaps containing said preceding adjacent block of memory and said succeeding adjacent block of memory to reflect said coalescing; and releasing said temporarily locked access.