ptrtag.h File Reference

Pointer Tagging Helpers. More...

Detailed Description

Pointer Tagging Helpers.

Author
Marian Buschsieweke maria.nosp@m.n.bu.nosp@m.schsi.nosp@m.ewek.nosp@m.e@ovg.nosp@m.u.de

Definition in file ptrtag.h.

#include <assert.h>
#include <inttypes.h>
#include <stdint.h>
+ Include dependency graph for ptrtag.h:

Go to the source code of this file.

Macros

#define PTRTAG   __attribute__((aligned(4)))
 Pointers to data marked with this attribute will be tag-able. More...
 

Functions

static void * ptrtag (void *ptr, uint8_t tag)
 Create a tagged pointer. More...
 
static void * ptrtag_ptr (void *tagged_ptr)
 Extract the original pointer from a tagged pointer. More...
 
static uint8_t ptrtag_tag (void *tagged_ptr)
 Extract the tag from a tagged pointer. More...