Apparatus and method for allocating memory space for program use and management purposes
First Claim
1. Apparatus for performing allocation of memory space during run-time of a program which makes memory allocation requests, the apparatus comprising allocator means arranged in use to execute as a process separate from that of a memory allocator associated with said program, the allocator means being arranged in use to intercept memory requests of said program and to allocate segments of memory in response thereto, the allocator means being further arranged to maintain an allocation section of memory having a structure corresponding to that of a working section of memory used by said program, the structure of said working section comprising first locations available for program use and second locations reserved for use by the memory allocator associated with said program, and wherein the arrangement is such that the allocator means, in use, upon intercepting memory requests by said program, allocates respective first locations of said working section to said program while leaving respective second locations unassigned, using, instead, locations within said allocation section corresponding to said respective second locations of said working section.
1 Assignment
0 Petitions
Accused Products
Abstract
In order to reduce problems caused by a user corrupting memory by incorrect use of memory allocation functions in the C programming language, memory allocation requests of an application (32) are monitored by a monitor sub-process (34) during run-time, and invalid memory allocation requests are detected and the application interrupted by the monitor sub-process. Additionally, an allocator sub-process (42) external to the application performs the memory allocation requests to shield the memory from user errors. A start-up dialog (48) synchronises the application (32) and allocator (42), and the allocator maintains during run-time a memory segment (46) conforming to the memory (44) allocated to the application.
-
Citations
16 Claims
- 1. Apparatus for performing allocation of memory space during run-time of a program which makes memory allocation requests, the apparatus comprising allocator means arranged in use to execute as a process separate from that of a memory allocator associated with said program, the allocator means being arranged in use to intercept memory requests of said program and to allocate segments of memory in response thereto, the allocator means being further arranged to maintain an allocation section of memory having a structure corresponding to that of a working section of memory used by said program, the structure of said working section comprising first locations available for program use and second locations reserved for use by the memory allocator associated with said program, and wherein the arrangement is such that the allocator means, in use, upon intercepting memory requests by said program, allocates respective first locations of said working section to said program while leaving respective second locations unassigned, using, instead, locations within said allocation section corresponding to said respective second locations of said working section.
-
10. A method of allocating memory space during run-time of a program, the method comprising:
-
1) running said program, said program making memory allocation requests;
2) executing an allocation process as a process separate from a memory allocation process, associated with said program, arranged to intercept said memory allocation requests and to allocate segments of memory to said program in response thereto; and
3) maintaining an allocation section of memory having a structure corresponding to that of a working section of memory used by said program, the structure of said working section comprising first locations available for program use, and second locations reserved for use by the memory allocation process associated with said program, and wherein the allocation process, upon intercepting said memory allocation requests by said program, allocates respective first locations of said working section to said program while leaving respective second locations unassigned, using, instead, locations within said allocation section corresponding to said respective second locations of said working section. - View Dependent Claims (11, 12, 13, 14, 16)
free unallocated memory;
free already freed memory;
reallocate unallocated memory;
reallocate already freed memory;
allocate or reallocate negative, zero size or excessive amount of memory.
-
-
16. A method according to claim 11, including executing a monitor means in association with the allocator process to assess memory requests by said program, and to interrupt the operation of said program upon detection of an invalid memory request.
Specification