Associating a native resource with an application
First Claim
1. A method comprising:
- requesting a native resource with an application;
creating a memory allocation containing an object that references the application and a name and an address of the native resource;
returning the object to the application for use of the native resource;
automatically checking the application to determine if the native resource can be released;
creating a plurality of memory allocations corresponding to a plurality of native resources allocated in response to a respective plurality of requests from one or more said applications, wherein each said memory allocation contains an object that references one said application and that includes the name and address of one said native resource;
wherein the creating a plurality of memory allocations further comprises, prior to creating each said memory allocation;
determining that the memory allocation cannot be created by determining that the native resource requested by the application is unavailable;
reviewing each said memory allocation that was previously created to determine if the application referenced by the object of the memory allocation is no longer using the native resource named in the object of the memory allocation;
for each said native resource determined to be no longer used, removing the memory allocation containing the object that includes the name of the native resource determined to be no longer used to thereby release the native resource; and
,when a released said native resource corresponds to the native resource determined to be unavailable, creating a memory allocation containing an object that references the requesting said application and that includes the name and address of the released said native resource.
2 Assignments
0 Petitions
Accused Products
Abstract
Handles associate respective native resources with an application that utilizes a library to call for the native resource. Each handle is created to track a native resource that has been allocated to an application. All native resources associated with the application are freed by examining the handles to find those native resources still being held by the application after they are no longer being used, or when that application has been, or is being, terminated. If a native resource is requested by the application and found to be unavailable, the handles are reviewed to collect allocated native resources that are found to be unneeded by their respective applications. A collected native resource corresponding to the requested native resource is thereby made available to be reallocated to the requesting application.
45 Citations
49 Claims
-
1. A method comprising:
-
requesting a native resource with an application; creating a memory allocation containing an object that references the application and a name and an address of the native resource; returning the object to the application for use of the native resource; automatically checking the application to determine if the native resource can be released; creating a plurality of memory allocations corresponding to a plurality of native resources allocated in response to a respective plurality of requests from one or more said applications, wherein each said memory allocation contains an object that references one said application and that includes the name and address of one said native resource; wherein the creating a plurality of memory allocations further comprises, prior to creating each said memory allocation; determining that the memory allocation cannot be created by determining that the native resource requested by the application is unavailable; reviewing each said memory allocation that was previously created to determine if the application referenced by the object of the memory allocation is no longer using the native resource named in the object of the memory allocation; for each said native resource determined to be no longer used, removing the memory allocation containing the object that includes the name of the native resource determined to be no longer used to thereby release the native resource; and
,when a released said native resource corresponds to the native resource determined to be unavailable, creating a memory allocation containing an object that references the requesting said application and that includes the name and address of the released said native resource. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A computer readable storage medium having computer instructions thereon that, where executed by a computer, perform acts comprising:
-
requesting a native resource with an application; creating a memory allocation containing an object that references the application and a name and an address of the native resource; returning the object to the application for use of the native resource; automatically checking the application to determine if the native resource can be released; creating a plurality of memory allocations corresponding to a plurality of native resources allocated in response to a respective plurality of requests from one or more said applications, wherein each said memory allocation contains an object that references one said application and that includes the name and address of one said native resource; wherein the creating a plurality of memory allocations further comprises, prior to creating each said memory allocation; determining that the memory allocation cannot be created by determining that the native resource requested by the application is unavailable; reviewing each said memory allocation that was previously created to determine if the application referenced by the object of the memory allocation is no longer using the native resource named in the object of the memory allocation; for each said native resource determined to be no longer used, removing the memory allocation containing the object that includes the name of the native resource determined to be no longer used to thereby release the native resource; and
,when a released said native resource corresponds to the native resource determined to be unavailable, creating a memory allocation containing an object that references the requesting said application and that includes the name and address of the released said native resource.
-
-
13. A method comprising:
-
requesting a native resource with an application; receiving the request and calling for the native resource with a library member; allocating the native resource by; creating a handle containing an object that references the application; inputting a name and an address of the native resource in the object in the created handle; returning the object to the calling library member; returning the object to the application from the calling library member; automatically checking the application to determine if the native resource can be released; creating a plurality of handles corresponding to a plurality of native resources allocated in response to a respective plurality of requests from one or more said applications, wherein each said handle contains an object that references one said application and that includes the name and address of one said native resource; wherein the creating a plurality of handles further comprises, prior to creating each said handle; determining that the handle cannot be created by determining that the native resource requested by the application is unavailable; reviewing each said handle that was previously created to determine if the application referenced by the object of the handle is no longer using the native resource for which the name and address thereof is contained in the object of the handle and which said native resource had been allocated in response to the request from the application; for each said native resource determined to be no longer used, removing the handle containing the object that includes the name and address of the native resource determined to be no longer used to thereby release the native resource; when a released said native resource corresponds to the native resource determined to be unavailable, reallocating the released said native resource by; creating a handle containing an object that references the requesting said application; and inputting the name and address of the released said native resource in the object in the created handle. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
-
-
26. A computer readable storage medium comprising computer executable instructions for performing steps executed in a native code portion of a computer environment, the steps including:
-
receiving one of more calls each being for a native resource requested by an application; creating, for each said call, a handle containing an object that references the application and the name and address of the native resource; sending each said object for delivery to the respective application to enable the application access to and use of the respective native resource; automatically checking the application to determine if the native resource can be released; wherein the step of the creating a handle further comprises, prior to creating each said handle; determining that the handle cannot be created by determining that the native resource requested by the application is unavailable; reviewing each said handle that was previously created to determine if the application referenced by the object of the handle is no longer using the native resource named in the object of the handle; for each said native resource determined to be no longer used, removing the handle containing the object that includes the name of the native resource determined to be no longer used to thereby release the native resource; and
,when a released said native resource corresponds to the native resource determined to be unavailable, creating a handle containing an object that references the requesting said application and that includes the name and address of the released said native resource. - View Dependent Claims (27, 28, 29, 30, 31)
-
-
32. A computer readable storage medium having computer executable instructions for performing steps comprising:
-
requesting a native resource of an operating system from a domain of an application in a managed code portion of a computer environment; receiving the request and calling for the native resource from a library member in the managed code portion of the computer environment; receiving the call in a native code portion of the computer environment; allocating the native resource by; creating a handle in the native code portion of the computer environment, the handle containing an object that references the domain of the application; inputting a name and an address of the native resource in the object in the created handle; returning the object to the calling library member; returning the object to the domain of the application from the calling library member; automatically checking the application to determine if the native resource can be release; creating a plurality of handles corresponding to a plurality of native resources allocated in response to a respective plurality of requests from one or more said domains of the applications, wherein each said handle contains one said object that references one said domain of the application and that includes the name and address of one said native resource, wherein the step of creating a plurality of handles further comprises, prior to creating each said handle; determining that the handle cannot be created by determining that the native resource requested by the domain of the application is unavailable; reviewing each said handle that was previously created to determine if the domain of the application referenced by the object of the handle is no longer using the native resource for which the name and address thereof is contained in the object of the handle and which said native resource had been allocated in response to the request from the domain of the application; for each said native resource determined to be no longer used, removing the handle containing the object that includes the name and address of the native resource determined to be no longer used to thereby release the native resource; when a released said native resource corresponds to the native resource determined to be unavailable, reallocating the released said native resource by; creating a handle containing an object that references the requesting said domain of the application; and
,inputting the name and address of the released said native resource in the object in the created handle. - View Dependent Claims (33, 34, 35, 36, 37, 38, 39, 40)
-
-
41. An apparatus having a processor comprising:
-
a virtual machine operating in a managed code portion for executing an application; an execution engine for the virtual machine operating in a native code portion; an operating system upon which the virtual machine execution engine is stacked; means for requesting a native resource with the application; means for creating a handle in the native code portion, the handle containing an object that references the application and the name and address of the native resource; means for returning the object to the application for use of the native resource; means for automatically checking the application to determine if the native resource can be released; means for creating a plurality of handles corresponding to a plurality of native resources allocated in response to a respective plurality of requests from one or more said applications, wherein each said handle contains an object that references one said application and that includes the name and address of one said native resource, wherein the means for creating a plurality of handles further comprises means, prior to creating each said handle; for determining that the handle cannot be created by determining that the native resource requested by the application is unavailable; for reviewing each said handle that was previously created to determine if the application referenced by the object of the handle is no longer using the native resource named in the object of the handle; for removing the handle containing the object that includes the name of the native resource determined to be no longer used to thereby release the native resource, for each said native resource determined to be no longer used; for reallocating the released said native resource, when a released said native resource corresponds to the native resource determined to be unavailable, by using; means for creating a handle containing an object that references the requesting said application; and
,means for inputting the name and address of the released said native resource in the object in the created handle. - View Dependent Claims (42, 43, 44, 45, 46, 47, 48, 49)
-
Specification