IP Library Granted Patent US 7,299,384
Granted Patent B1
US 7,299,384 · App. 10/920,597 · Granted Nov 20, 2007

Fixing prematurely freed objects

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,299,384
App. No.
10/920,597
Granted
Nov 20, 2007
Kind
B1
Abstract

A method and mechanism for managing dynamically allocated memory. Portions of memory which are available for allocation have additional information stored in association with each portion which indicates whether the portion has been previously identified as being prematurely freed. In addition, a checksum is stored with each portion of memory. In response to a request for deallocation of a portion of memory, the portion of memory is not deallocated if it is identified as having been prematurely freed. Otherwise, the a checksum is calculated for the portion and it is freed. In response to an allocation request, a candidate portion of memory is identified for allocation and a checksum is calculated for the candidate portion. If the calculated checksum does not match a checksum previously stored for the candidate portion, the portion is identified as having been prematurely freed and is not returned for allocation.

Claims (63)

1. A method for managing memory, said method comprising:

detecting a request to free a first block of memory;

freeing said first block of memory, in response to detecting said request and determining said first block of memory does not correspond to a prematurely freed block of memory; and

not freeing said first block of memory, in response to detecting said request and determining said first block of memory corresponds to a prematurely freed block of memory;

in response to identifying the first block corresponds to a prematurely freed block of memory:

storing an indication that the candidate block corresponds to a prematurely freed block of memory;

skipping said first block for purposes of allocation; and

searching for a new block for allocation.

2. The method as recited in claim 1 , wherein in response to determining said block of memory does not correspond to a prematurely freed block of memory, the method further comprises:

calculating a checksum corresponding to said block; and

storing said checksum in association with said block.

3. The method as recited in claim 2 , further comprising:

detecting a request for an allocation of a block of memory;

identifying a candidate block of memory for allocation;

calculating a checksum of said candidate block and comparing the calculated checksum to a previously stored checksum which is associated with the candidate block;

allocating the candidate block, in response to detecting the calculated checksum matches the previously stored checksum; and

identifying the candidate block as corresponding to a prematurely freed block of memory, in response to detecting the calculated checksum does not match the stored checksum.

4. The method as recited in claim 1 , further comprising maintaining a list which identifies requesters of memory allocation which are deemed unsafe.

5. The method as recited in claim 4 , wherein the list identifies the requesters by a program counter corresponding the requester instruction in the program code.

6. The method as recited in claim 5 , wherein freeing said first block of memory is in further response to determining the first block of memory does not correspond to a requestor which is included in the list.

7. The method as recited in claim 6 , wherein in response to detecting the request for an allocation of a block of memory and identifying the candidate block as corresponding to a prematurely freed block of memory, the method further comprises storing an identification of the requester in association with the candidate block and adding the identification to the list.

8. A computing system comprising:

a memory configured to store data; and

a processing device configured to:

detect a request to free a first block of memory;

determine whether said first block of memory corresponds to a prematurely freed block of memory;

free said first block of memory, in response to detecting said request and determining said first block of memory does not correspond to a prematurely freed block of memory; and

not free said first block of memory, in response to detecting said request and determining said first block of memory corresponds to a prematurely freed block of memory;

in response to identifying the first block corresponds to a prematurely freed block of memory:

store an indication that the first block corresponds to a prematurely freed block of memory;

skip said first block for purposes of allocation; and

search for a new block for allocation.

9. The computing system as recited in claim 8 , wherein in response to determining said block of memory does not correspond to a prematurely freed block of memory, the processing device is further configured to:

calculate a checksum corresponding to said block; and

store said checksum in association with said block.

10. The computing system as recited in claim 9 , wherein the processing device is further configured to:

detect a request for an allocation of a block of memory;

identify a candidate block of memory for allocation;

calculate a checksum of said candidate block and comparing the calculated checksum to a previously stored checksum which is associated with the candidate block;

allocate the candidate block, in response to detecting the calculated checksum matches the previously stored checksum; and

identify the candidate block as corresponding to a prematurely freed block of memory, in response to detecting the calculated checksum does not match the stored checksum.

11. The computing system as recited in claim 8 , wherein the processing device is further configured to maintain a list which identifies requestors of memory allocation which are deemed unsafe.

12. The computing system as recited in claim 11 , wherein the list identifies the requesters by a program counter corresponding the requestor instruction in the program code.

13. The computing system as recited in claim 12 , wherein freeing said first block of memory is in further response to determining the first block of memory does not correspond to a requester which is included in the list.

14. The computing system as recited in claim 13 , wherein in response to detecting the request for an allocation of a block of memory and identifying the candidate block as corresponding to a prematurely freed block of memory, the processing device is further configured to store an identification of the requester in association with the candidate block and add the identification to the list.

15. A computer storage medium comprising program instructions for use in monitoring memory usage in an application, wherein the program instructions are computer-executable to:

detect a request to free a first block of memory;

free said first block of memory, in response to detecting said request and determining said first block of memory does not correspond to a prematurely freed block of memory; and

not free said first block of memory, in response to detecting said request and determining said first block of memory corresponds to a prematurely freed block of memory;

in response to identifying the candidate block corresponds to a prematurely freed block of memory, the program instructions are further executable to:

store an indication that the candidate block corresponds to a prematurely freed block of memory;

skip said candidate block for purposes of allocation; and

search for a new candidate block for allocation.

16. The computer storage medium as recited in claim 15 , wherein in response to determining said block of memory does not correspond to a prematurely freed block of memory, the program instructions are further executable to:

calculate a checksum corresponding to said block; and

store said checksum in association with said block.

17. The computer storage medium as recited in claim 16 , wherein the program instructions are further executable to:

detect a request for an allocation of a block of memory;

identify a candidate block of memory for allocation;

calculate a checksum of said candidate block and comparing the calculated checksum to a previously stored checksum which is associated with the candidate block;

allocate the candidate block, in response to detecting the calculated checksum matches the previously stored checksum; and

identify the candidate block as corresponding to a prematurely freed block of memory, in response to detecting the calculated checksum does not match the stored checksum.

18. The computer storage medium as recited in claim 15 , the program instructions are further executable to maintain a list which identifies requesters of memory allocation which are deemed unsafe.

Assignments (18)
SECURITY INTEREST Recorded Dec 12, 2025
From: ARCTERA US LLC
To: CITIBANK, N.A., AS COLLATERAL AGENT
Reel/Frame 073951/0470 →
TERMINATION AND RELEASE OF PATENT SECURITY AGREEMENT AT R/F 070530/0497 Recorded Dec 1, 2025
From: BANK OF AMERICA, N.A., AS COLLATERAL AGENT
To: ARCTERA US LLC
Reel/Frame 073833/0730 →
TERMINATION AND RELEASE OF PATENT SECURITY AGREEMENT AT R/F 069585/0150 Recorded Dec 1, 2025
From: WILMINGTON TRUST, NATIONAL ASSOCIATION, AS COLLATERAL AGENT
To: ARCTERA US LLC
Reel/Frame 073833/0848 →
RELEASE OF SECURITY INTEREST Recorded Dec 16, 2024
From: ACQUIOM AGENCY SERVICES LLC, AS COLLATERAL AGENT
To: VERITAS TECHNOLOGIES LLC (F/K/A VERITAS US IP HOLDINGS LLC)
Reel/Frame 069712/0090 →
RELEASE OF SECURITY INTEREST Recorded Dec 13, 2024
From: WILMINGTON TRUST, NATIONAL ASSOCIATION, AS NOTES COLLATERAL AGENT
To: VERITAS TECHNOLOGIES LLC
Reel/Frame 069634/0584 →
SECURITY INTEREST Recorded Dec 10, 2024
From: ARCTERA US LLC
To: BANK OF AMERICA, N.A., AS COLLATERAL AGENT
Reel/Frame 069563/0243 →
PATENT SECURITY AGREEMENT Recorded Dec 10, 2024
From: ARCTERA US LLC
To: WILMINGTON TRUST, NATIONAL ASSOCIATION, AS COLLATERAL AGENT
Reel/Frame 069585/0150 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 9, 2024
From: VERITAS TECHNOLOGIES LLC
To: ARCTERA US LLC
Reel/Frame 069548/0468 →
ASSIGNMENT OF SECURITY INTEREST IN PATENT COLLATERAL Recorded Nov 25, 2024
From: BANK OF AMERICA, N.A., AS ASSIGNOR
To: ACQUIOM AGENCY SERVICES LLC, AS ASSIGNEE
Reel/Frame 069440/0084 →
TERMINATION AND RELEASE OF SECURITY IN PATENTS AT R/F 037891/0726 Recorded Nov 30, 2020
From: WILMINGTON TRUST, NATIONAL ASSOCIATION, AS COLLATERAL AGENT
To: VERITAS US IP HOLDINGS, LLC
Reel/Frame 054535/0814 →
SECURITY INTEREST Recorded Aug 20, 2020
From: VERITAS TECHNOLOGIES LLC
To: WILMINGTON TRUST, NATIONAL ASSOCIATION, AS NOTES COLLATERAL AGENT
Reel/Frame 054370/0134 →
MERGER AND CHANGE OF NAME Recorded Apr 18, 2016
From: VERITAS US IP HOLDINGS LLC; VERITAS TECHNOLOGIES LLC
To: VERITAS TECHNOLOGIES LLC
Reel/Frame 038455/0752 →
SECURITY INTEREST Recorded Feb 23, 2016
From: VERITAS US IP HOLDINGS LLC
To: WILMINGTON TRUST, NATIONAL ASSOCIATION, AS COLLATERAL AGENT
Reel/Frame 037891/0726 →
SECURITY INTEREST Recorded Feb 23, 2016
From: VERITAS US IP HOLDINGS LLC
To: BANK OF AMERICA, N.A., AS COLLATERAL AGENT
Reel/Frame 037891/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 4, 2016
From: SYMANTEC CORPORATION
To: VERITAS US IP HOLDINGS LLC
Reel/Frame 037697/0412 →
CORRECTIVE ASSIGNMENT TO CORRECT THE ASSIGNEE PREVIOUSLY RECORDED ON REEL 019872 FRAME 979. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNEE IS SYMANTEC OPERATING CORPORATION. Recorded Mar 5, 2012
From: VERITAS OPERATING CORPORATION
To: SYMANTEC OPERATING CORPORATION
Reel/Frame 027819/0462 →
CHANGE OF NAME Recorded Sep 26, 2007
From: VERITAS OPERATING CORPORATION
To: SYMANTEC CORPORATION
Reel/Frame 019872/0979 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 17, 2004
From: RODRIGUEZ-RIVERA, GUSTAVO; SPERTUS, MICHAEL P.; FITERMAN, CHARLES; POLUBINSKI, JIM; DAY, BRIAN; HOYT, DARYL; METCALF, CHRISTOPHER D.
To: VERITAS OPERATING CORPORATION
Reel/Frame 015706/0925 →