IP Library Granted Patent US 7,249,238
Granted Patent B2
US 7,249,238 · App. 10/867,929 · Granted Jul 24, 2007

Memory tracking with preservation of alignment semantics

Assignee: International Business Machines Corporation
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,249,238
App. No.
10/867,929
Granted
Jul 24, 2007
Kind
B2
Abstract

A method and system for tracking usage of memory in a computer system is provided. Arguments for both the size of a memory allocation and the type of memory being allocated are reserved in a fixed location. A first fixed location is reserved for small memory allocations, i.e. less than one page, and a second fixed location is reserved for large memory allocations, i.e. one page or larger. The fixed location is selected based upon a determination of the size of an allocation required by a calling application. Upon receipt of a memory allocation request by the calling application, a pointer is returned to the calling application identifying the fixed location. Similarly, upon release of memory by the calling application, a counter is decremented to track the amount of memory in use by the application.

Claims (39)

1. A method for tracking memory in a computer system comprising:

maintaining size and type information of a memory allocation in a fixed location;

selecting a first fixed location for a small memory allocation, and selecting a second fixed location for a large memory allocation; and

returning a pointer to a calling application identifying said fixed location.

2. The method of claim 1 , wherein the step of selecting first and second fixed locations includes distinguishing between small and large memory allocations.

3. The method of claim 1 , wherein said first fixed location is a header of a small memory allocation.

4. The method of claim 1 , wherein said second fixed location is a hash table for a large memory allocation.

5. The method of claim 4 , further comprising identifying a location of said memory size allocation in said hash table.

6. The method of claim 1 , further comprising decrementing a counter by a size of said memory allocation size upon release of memory by said calling application.

7. The method of claim 6 , wherein said counter is selected from a group consisting of: a paged memory counter and a non-paged memory counter.

8. The method of claim 1 , wherein the step of returning a pointer to a calling application includes satisfying Windows alignment semantics for allocated memory.

9. The method of claim 1 , wherein said type information is selected from a group consisting of: paged and non-paged.

10. A computer system comprising:

a memory manager adapted to maintain memory size and type of memory allocation information in a fixed location;

an allocation manager adapted to select a first fixed location for a small memory allocation, and a second fixed location for a large memory allocation; and

a pointer adapted to identify said fixed location for a calling application.

11. The system of claim 10 , wherein said allocation manager differentiates between a small memory allocation and a large memory allocation.

12. The system of claim 10 , wherein said first fixed location is a header of a small memory allocation.

13. The system of claim 10 , wherein said second fixed location is a hash table for a large memory allocation.

14. The system of claim 13 , further comprising a locator adapted to identify a location of said memory size allocation in said hash table.

15. The system of claim 10 , further comprising a counter of a memory allocation size adapted to be decremented in response to release of memory by said calling application.

16. The system of claim 15 , wherein said counter is selected from the group consisting of: a paged memory counter and a non-paged memory counter.

17. The system of claim 10 , wherein a return of said pointer to a calling application satisfies Windows alignment semantics for allocated memory.

18. The system of claim 10 , wherein said type information is selected from a group consisting of: paged and non-paged.

19. An article comprising:

a computer-readable signal-bearing medium;

means in the medium for maintaining size and type information of memory allocation in a fixed location;

means in the medium for selecting a first fixed location for a small memory allocation and a second fixed location for a large memory allocation; and

means in the medium for identifying said fixed location to a calling application.

20. The article of claim 19 , wherein said medium is recordable data storage medium.

21. The article of claim 19 , wherein said mean for selecting first and second fixed locations includes differentiating between a small and a large memory allocation in said fixed location.

22. The article of claim 19 , wherein said means for maintaining size and type of memory allocation is a memory manager.

23. The article of claim 19 , wherein said first fixed location is a header of a small memory allocation.

24. The article of claim 19 , wherein said second fixed location is a hash table for a large memory allocation.

25. The article of claim 24 , further comprising means in the medium for identifying a location of said memory size allocation in said hash table.

26. The article of claim 25 , wherein said means for identifying said fixed location for return to a calling application includes satisfying Windows alignment semantics for allocated memory.

27. The article of claim 19 , further comprising means in the medium for maintaining a count of memory used by said calling application.

28. The article of claim 27 , wherein said means for maintaining said count is selected from the group consisting of: a paged

memory counter and a non-paged memory counter.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 23, 2005
From: AHLUWALIA, VIKAS; PIPER, SCOTT A.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 016268/0406 →
Continuity (1)
Related Publication 20050278498A1 · Dec 15, 2005