Patent ID: 7036125

Claim:
A method for eliminating memory corruption comprising the steps of: receiving a command to perform a tree operation on a tree associated with a thread; and locking one or more resources associated with said requested tree operation during an execution of said requested tree operation using a first and a second semaphore, wherein said one or more resources are associated with said first semaphore and said second semaphore, wherein the step of locking further comprises the steps of: indicating whether a resource associated with said first semaphore is locked or is available to be accessed by other threads based on a value of said first semaphore; and indicating whether a resource associated with said second semaphore during a portion of said execution of said requested tree operation is locked or is available to be accessed by other threads based on a value of said second semaphore; wherein said resource associated with said second semaphore is locked during a portion of said execution of said requested tree operation, wherein said resource associated with said second semaphore is made available during a remaining portion of said execution of said requested tree operation.