Methods, devices, and media for hardware-supported object metadata retrieval
AssigneesThe Governing Council of the University of Toronto, Huawei Technologies Canada Co., Ltd.
InventorsDavid Lie, Shengjie Xu, Wei Huang
Life of this patent
Estimating the term…
Abstract
Methods and devices for hardware-supported schemes for efficient metadata retrieval are described. The schemes may use hardware to efficiently enforce type safety and speed up memory bound checks without imposing undue memory overhead. Multiple such schemes may be supported by a device, permitting the selection of an optimal scheme based on a given memory allocation request. The schemes may be compatible with legacy code and applicable to a wide range of data objects and system constraints. Compilation, instrumentation, and linking of code to effect such schemes is also described.
Claims20
A device, comprising:
- a metadata retrieval hardware module;
- a processor device;
- and
- a memory containing instructions that, when executed by the processor device, operate a software module to provide a pointer to the metadata retrieval hardware module, the pointer comprising:
- address data encoding an object location, the object location indicating a location within an object stored in the memory;
- and
- on-pointer metadata;
- the metadata retrieval hardware module being configured to:
- use the on-pointer metadata to identify a pointer type of the pointer from a plurality of pointer types, the plurality of pointer types comprising:
- an object-relative pointer type;
- and
- a second pointer type;
- calculate the metadata location of a pointer of the object-relative pointer type by:
- decoding a metadata offset from the on-pointer metadata of the pointer;
- and
- adding the metadata offset to the object location to calculate the metadata location;
- calculate the metadata location of a pointer of the second pointer type by:
- determining a base location different from the object location;
- and
- adding an offset amount, calculated based on the on-pointer metadata, to the base location to calculate the metadata location;
- retrieve object metadata from the metadata location;
- and
- provide the object metadata to the software module.
A method comprising:
- using a software module to provide a pointer to a metadata retrieval hardware module, the pointer comprising:
- address data encoding an object location, the object location indicating a location within an object stored in a memory;
- and
- on-pointer metadata;
- using the metadata retrieval hardware module to:
- use the on-pointer metadata to identify a pointer type of the pointer from a plurality of pointer types, the plurality of pointer types comprising:
- an object-relative pointer type wherein:
- the on-pointer metadata encodes a metadata offset;
- and
- a metadata location is offset from the object location by the metadata offset;
- and
- a second pointer type wherein a metadata location is offset from a base location by an offset amount calculated based on the on-pointer metadata;
- and
- calculate the metadata location based at least in part on the pointer type of the pointer;
- retrieve object metadata from the metadata location;
- and
- provide the object metadata to the software module.
Dependencies are inferred from the claim text.