[PATCH v12 3/6] ptr_compress: add pointer compression library

Morten Brørup mb at smartsharesystems.com
Wed May 29 13:52:49 CEST 2024


> From: Paul Szczepanek [mailto:paul.szczepanek at arm.com]
> Sent: Wednesday, 29 May 2024 12.23
> 
> Add a new utility header for compressing pointers. The provided
> functions can store pointers as 32-bit or 16-bit offsets.
> 
> The compression takes advantage of the fact that pointers are
> usually located in a limited memory region (like a mempool).
> We can compress them by converting them to offsets from a base
> memory address. Offsets can be stored in fewer bytes (dictated
> by the memory region size and alignment of the pointer).
> For example: an 8 byte aligned pointer which is part of a 32GB
> memory pool can be stored in 4 bytes.
> 
> Suggested-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
> Signed-off-by: Paul Szczepanek <paul.szczepanek at arm.com>
> Signed-off-by: Kamalakshitha Aligeri <kamalakshitha.aligeri at arm.com>
> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
> Reviewed-by: Nathan Brown <nathan.brown at arm.com>
> Reviewed-by: Jack Bond-Preston <jack.bond-preston at foss.arm.com>
> ---

Acked-by: Morten Brørup <mb at smartsharesystems.com>



More information about the dev mailing list