Heap management for memory corruption detection
First Claim
1. A processor comprising:
- a memory to store data from an application, wherein the memory comprises a memory corruption detection (MCD) table; and
a processor core coupled to the memory, wherein the processing core is operable to;
receive, from the application, an allocation request for an allocation of one or more contiguous memory blocks of the memory for a memory object;
allocate the one or more contiguous memory blocks for the memory object in view of a size of the memory object requested;
write, into the MCD table, a first MCD unique identifier associated with the one or more contiguous memory blocks;
create a pointer with a memory address of the memory object and a second MCD unique identifier associated with the memory object; and
send, to the application, the pointer, wherein the allocation request is for an allocation having at least one of a first size or a second size, wherein the first size corresponds to a number of contiguous memory blocks below a first threshold amount, and wherein the second size corresponds to a number of contiguous memory blocks that exceeds the first threshold amount.
1 Assignment
0 Petitions
Accused Products
Abstract
Memory corruption detection technologies are described. A method can include receiving, from the application, an allocation request for an allocation of one or more contiguous memory blocks of the memory for a memory object. The method can further include allocating, by a processor, the one or more contiguous memory blocks for the memory object in view of a size of the memory object requested. The method can further include writing, into a MCD table, a first memory corruption detection (MCD) unique identifier associated with the one or more contiguous memory blocks. The method can further include creating a pointer with a memory address of the memory object and a second MCD unique identifier associated with the memory object. The method can further include sending, to the application, the pointer.
-
Citations
20 Claims
-
1. A processor comprising:
-
a memory to store data from an application, wherein the memory comprises a memory corruption detection (MCD) table; and a processor core coupled to the memory, wherein the processing core is operable to; receive, from the application, an allocation request for an allocation of one or more contiguous memory blocks of the memory for a memory object; allocate the one or more contiguous memory blocks for the memory object in view of a size of the memory object requested; write, into the MCD table, a first MCD unique identifier associated with the one or more contiguous memory blocks; create a pointer with a memory address of the memory object and a second MCD unique identifier associated with the memory object; and send, to the application, the pointer, wherein the allocation request is for an allocation having at least one of a first size or a second size, wherein the first size corresponds to a number of contiguous memory blocks below a first threshold amount, and wherein the second size corresponds to a number of contiguous memory blocks that exceeds the first threshold amount. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A processor comprising:
-
a memory to store data from an application, wherein the memory comprises a memory corruption detection (MCD) table; and a processor core coupled to the memory, wherein the processing core is operable to; receive, from the application, an allocation request for an allocation of one or more contiguous memory blocks of the memory for a memory object; allocate the one or more contiguous memory blocks for the memory object in view of a size of the memory object requested; write, into the MCD table, a first MCD unique identifier associated with the one or more contiguous memory blocks; create a pointer with a memory address of the memory object and a second MCD unique identifier associated with the memory object; send, to the application, the pointer; divide the one or more contiguous memory blocks into a plurality of sub-blocks, wherein the plurality of sub-blocks comprise; an initial sub-block; one or more middle sub-blocks; and a last sub-block; and store data in at least one of a memory allocation meta-data field, a user data field, an overhead data field, or an empty data field, wherein each of the least one of the memory allocation meta-data field, the user data field, the overhead data field, or the empty data field is aligned at a boundary of one of the plurality of sub-blocks. - View Dependent Claims (7, 8, 9, 10)
-
-
11. A processor comprising:
-
a memory to store data from an application, wherein the memory comprises a memory corruption detection (MCD) table; and a processor core coupled to the memory, wherein the processing core is operable to; receive, from the application, an allocation request for an allocation of one or more contiguous memory blocks of the memory for a memory object; allocate the one or more contiguous memory blocks for the memory object in view of a size of the memory object requested; write, into the MCD table, a first MCD unique identifier associated with the one or more contiguous memory blocks; create a pointer with a memory address of the memory object and a second MCD unique identifier associated with the memory object; send, to the application, the pointer; determine the MCD unique identifier associated with the memory object using a random selection scheme; and verify that the MCD unique identifier is different from another MCD unique identifier of an adjacent contiguous memory block.
-
-
12. A system on a chip (SoC) comprising:
-
a processor; a memory device coupled to the processor; a memory controller coupled to the memory device, the memory controller to; receive, from an application, a release request for a release of a memory object in a system memory of a processor, wherein the release request comprises a pointer; identify a first memory corruption detection (MCD) unique identifier and a memory address of the pointer; change the first MCD unique identifier; change a second MCD unique identifier in an MCD table of the system memory associated with the memory address of the pointer; and release a memory object in the system memory associated with the memory address. - View Dependent Claims (13, 14, 15)
-
-
16. A method comprising:
-
receiving, from an application, an allocation request for an allocation of one or more contiguous memory blocks of the memory for a memory object; allocating, by a processor, the one or more contiguous memory blocks for the memory object in view of a size of the memory object requested; writing, into a memory corruption detection (MCD) table, a first MCD unique identifier associated with the one or more contiguous memory blocks; creating a pointer with a memory address of the memory object and a second MCD unique identifier associated with the memory object; and sending, to the application, the pointer; determining the second MCD unique identifier associated with the memory object using a random selection scheme; and verifying that the second MCD unique identifier is different from another MCD unique identifier of an adjacent contiguous memory block. - View Dependent Claims (17, 18, 19, 20)
-
Specification